keith-turner commented on code in PR #3276:
URL: https://github.com/apache/accumulo/pull/3276#discussion_r1157672378


##########
core/src/main/java/org/apache/accumulo/core/security/Authorizations.java:
##########
@@ -112,6 +112,8 @@ private void checkAuths() {
    */
   public Authorizations(Collection<byte[]> authorizations) {
     checkArgument(authorizations != null, "authorizations is null");
+    this.auths = new HashSet<>(authorizations.size());
+    this.authsList = new ArrayList<>(authorizations.size());

Review Comment:
   Ah the fun of going back to Java 8.  I looked at the implementation of 
emptySet() and emptyList() and for the version of Java I am using those both 
avoid any object allocation like List.of() and Set.of()



-- 
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]

Reply via email to