You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/04/27 19:08:57 UTC

[GitHub] [accumulo] keith-turner opened a new issue #2040: Use Set.of() instead of new HashSet<>(Arrays.asList) in

keith-turner opened a new issue #2040:
URL: https://github.com/apache/accumulo/issues/2040


   Java recently introduced the Set.of() static methods for creating immutable sets.  These new methods could be user [here](https://github.com/apache/accumulo/blob/9afab2c1b931d100ed6bad5cfe028c28da944427/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java#L79) and [here](https://github.com/apache/accumulo/blob/9afab2c1b931d100ed6bad5cfe028c28da944427/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java#L90) instead of `new HashSet<>(Arrays.asList(`. This would shorten the code and make the sets immutable, which seems to be the intention of the code.
   
   


-- 
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:
users@infra.apache.org



[GitHub] [accumulo] keith-turner commented on issue #2040: Use Set.of() instead of new HashSet<>(Arrays.asList) in

Posted by GitBox <gi...@apache.org>.
keith-turner commented on issue #2040:
URL: https://github.com/apache/accumulo/issues/2040#issuecomment-827850563


   There are other places where this type of change could be made. In Linux can run the following command on the Accumulo source code to look possible places to make this change.
   
   ```bash
   find . -name "*.java" | xargs grep asList | grep new | grep Set 
   ```


-- 
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:
users@infra.apache.org



[GitHub] [accumulo] hguercan commented on issue #2040: Use Set.of() instead of new HashSet<>(Arrays.asList()) in MetadataConstraints.

Posted by GitBox <gi...@apache.org>.
hguercan commented on issue #2040:
URL: https://github.com/apache/accumulo/issues/2040#issuecomment-830443849


   Hi, I would like to work on this issue


-- 
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:
users@infra.apache.org



[GitHub] [accumulo] EdColeman closed issue #2040: Use Set.of() instead of new HashSet<>(Arrays.asList()) in MetadataConstraints.

Posted by GitBox <gi...@apache.org>.
EdColeman closed issue #2040:
URL: https://github.com/apache/accumulo/issues/2040


   


-- 
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:
users@infra.apache.org



[GitHub] [accumulo] keith-turner edited a comment on issue #2040: Use Set.of() instead of new HashSet<>(Arrays.asList) in

Posted by GitBox <gi...@apache.org>.
keith-turner edited a comment on issue #2040:
URL: https://github.com/apache/accumulo/issues/2040#issuecomment-827850563


   There are other places where this type of change could be made. In Linux can run the following command on the Accumulo source code to look possible places to make this change.
   
   ```bash
   find . -name "*.java" | xargs grep asList | grep new | grep Set 
   ```
   
   However, not all of these places may be suitable for the replacement.  In cases where the set is being mutated, would not want to use Set.of to create it.


-- 
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:
users@infra.apache.org



[GitHub] [accumulo] EdColeman commented on issue #2040: Use Set.of() instead of new HashSet<>(Arrays.asList()) in MetadataConstraints.

Posted by GitBox <gi...@apache.org>.
EdColeman commented on issue #2040:
URL: https://github.com/apache/accumulo/issues/2040#issuecomment-830821438


   Closed with #2065 


-- 
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:
users@infra.apache.org