smolnar82 commented on code in PR #1236:
URL: https://github.com/apache/knox/pull/1236#discussion_r3278814956
##########
gateway-server/src/main/java/org/apache/knox/gateway/services/ldap/backend/LdapProxyBackend.java:
##########
@@ -269,6 +274,18 @@ public Entry getUser(String username, SchemaManager
schemaManager) throws Except
return entry;
}
cursor.close();
Review Comment:
This is what it looks like now:
<img width="1008" height="357" alt="image"
src="https://github.com/user-attachments/assets/429c91e1-ec61-4c68-afe9-5df3f9808880"
/>
As you can see, there is a `cursor.close()` before the `return entry` line
too that ensures the cursor is closed.
However, I'd think that adding an `else` case to the `if (cursor.next())
{`condition would make it cleaner.
--
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]