rishabhdaim commented on code in PR #2212:
URL: https://github.com/apache/jackrabbit-oak/pull/2212#discussion_r2032328205


##########
oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncConfig.java:
##########
@@ -203,9 +207,9 @@ public Authorizable setAutoMembershipConfig(@NotNull 
AutoMembershipConfig autoMe
          */
         @NotNull
         public Set<String> getAutoMembership(@NotNull 
org.apache.jackrabbit.api.security.user.Authorizable authorizable) {
-            return ImmutableSet.<String>builder().
-                    
addAll(autoMembershipConfig.getAutoMembership(authorizable)).
-                    addAll(getAutoMembership()).build();
+            return Collections.unmodifiableSet((Set<String>)
+                    
Stream.concat(autoMembershipConfig.getAutoMembership(authorizable).stream(), 
getAutoMembership().stream())
+                            
.collect(Collectors.toCollection(LinkedHashSet::new)));

Review Comment:
   `getAutoMembership` has been marked as `@NotNull`



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to