You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/03/27 02:38:46 UTC

[GitHub] [zookeeper] maoling commented on a change in pull request #870: ZOOKEEPER-3335: Prefer ArrayList over LinkedList

maoling commented on a change in pull request #870: ZOOKEEPER-3335: Prefer ArrayList over LinkedList
URL: https://github.com/apache/zookeeper/pull/870#discussion_r269386992
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java
 ##########
 @@ -960,7 +963,7 @@ private void validateCreateRequest(String path, CreateMode createMode, Request r
         if (uniqacls == null || uniqacls.size() == 0) {
             throw new KeeperException.InvalidACLException(path);
         }
-        List<ACL> rv = new LinkedList<ACL>();
+        List<ACL> rv = new ArrayList<>();
         for (ACL a: uniqacls) {
 
 Review comment:
   `rv `only used the `add()`, what's the benefit of this change?

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


With regards,
Apache Git Services