From 98aa780c5204eb2d0170ab0e8602dc9fac1aa9b5 Mon Sep 17 00:00:00 2001 From: Forus <70357858+Forus0322@users.noreply.github.com> Date: Sun, 22 Dec 2024 12:10:48 +0800 Subject: [PATCH] [Improve] Redundant return variables are optimized (#4151) --- .../streampark/console/system/security/impl/LdapService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java index 6c4427cab4..8d8e836b35 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java @@ -109,8 +109,7 @@ private NamingEnumeration getSearchResults(String userId) throws N sc.setReturningAttributes(new String[]{ldapUserIdentifyingAttribute}); sc.setSearchScope(SearchControls.SUBTREE_SCOPE); EqualsFilter filter = new EqualsFilter(ldapUserIdentifyingAttribute, userId); - NamingEnumeration results = ctx.search(ldapBaseDn, filter.toString(), sc); - return results; + return ctx.search(ldapBaseDn, filter.toString(), sc); } private void renderLdapEnv() {