SbloodyS commented on code in PR #10532:
URL: https://github.com/apache/dolphinscheduler/pull/10532#discussion_r903231555


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/ldap/LdapService.java:
##########
@@ -119,7 +120,16 @@ public String ldapLogin(String userId, String userPwd) {
         } catch (NamingException e) {
             logger.error("ldap search error", e);
             return null;
+        } finally {
+            try {
+                if (ctx != null) {
+                    ctx.close();
+                }

Review Comment:
   I think we should not use `if` in here since we have used `try catch`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to