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:
[email protected]
With regards,
Apache Git Services