ilgrosso commented on code in PR #1004: URL: https://github.com/apache/syncope/pull/1004#discussion_r1978863126
########## client/am/console/src/main/java/org/apache/syncope/client/console/commons/AMRealmPolicyProvider.java: ########## @@ -77,7 +77,7 @@ public void add(final RealmTO realmTO, final RepeatingView view) { new PropertyModel<>(realmTO, "authPolicy"), false); authPolicy.setChoiceRenderer(new PolicyRenderer(authPolicies)); - authPolicy.setChoices(authPolicies.keySet().stream().collect(Collectors.toList())); + authPolicy.setChoices(new ArrayList<>(authPolicies.keySet())); Review Comment: Can you provide some reference to explain that in general ```java new ArrayList<>(collection); ``` shall be preferred over ```java collection.stream().collect(Collectors.toList()) ``` ? Thanks. -- 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: dev-unsubscr...@syncope.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org