You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/10/07 20:34:57 UTC

[tomcat] 03/04: Remove unnecessary code and avoid potential NPEs. Thanks to SpotBugs.

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 539377f7e2b831356dce7c5e68720e88085b78ee
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Mar 6 12:17:03 2020 +0000

    Remove unnecessary code and avoid potential NPEs. Thanks to SpotBugs.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java
index d7553b6..1c5d06e 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1329,9 +1329,6 @@ public class JNDIRealm extends RealmBase {
             // Log the problem for posterity
             containerLog.error(sm.getString("jndiRealm.exception"), e);
 
-            // Close the connection so that it gets reopened next time
-            close(connection);
-
             // Return "not authenticated" for this request
             if (containerLog.isDebugEnabled())
                 containerLog.debug("Returning null principal.");
@@ -2310,9 +2307,6 @@ System.out.println("getUserBySearch " + username);
             // Log the problem for posterity
             containerLog.error(sm.getString("jndiRealm.exception"), e);
 
-            // Close the connection so that it gets reopened next time
-            close(connection);
-
             // Return "not authenticated" for this request
             return null;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org