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

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

commit 95658dfd868216db0773c38aad8eebf544024b09
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 9bfa7a2..b0020c0 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1321,9 +1321,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.");
@@ -2295,9 +2292,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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to