rhtyd commented on a change in pull request #3694: Ldap fixes URL: https://github.com/apache/cloudstack/pull/3694#discussion_r361093243
########## File path: plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListUsersCmd.java ########## @@ -201,33 +199,10 @@ public void execute() throws ServerApiException { if(s_logger.isTraceEnabled()) { s_logger.trace(String.format("applying filter: %s or %s.", this.getListTypeString(), this.getUserFilter())); } - Method filterMethod = getFilterMethod(); - List<LdapUserResponse> responseList = ldapResponses; - if (filterMethod != null) { - if(s_logger.isTraceEnabled()) { - s_logger.trace("applying filter: " + filterMethod.getName()); - } - try { - responseList = (List<LdapUserResponse>)filterMethod.invoke(this, ldapResponses); - } catch (IllegalAccessException | InvocationTargetException e) { - throw new CloudRuntimeException("we're damned, the earth is screwed. we will now return to our maker",e); - } - } + List<LdapUserResponse> responseList = getUserFilter().filter(this,ldapResponses); Review comment: This refactoring LGTM, @nvazquez @DaanHoogland. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services