Shoothzj commented on code in PR #3333:
URL: https://github.com/apache/bookkeeper/pull/3333#discussion_r897491744
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java:
##########
@@ -426,7 +426,7 @@ public BookieImpl(ServerConfiguration conf,
}
// instantiate the journals
- journals = Lists.newArrayList();
+ journals = Lists.newArrayListWithCapacity(journalDirectories.size());
Review Comment:
I think `new ArrayList<>(size)` is better. Guava also recommend jdk8+ to use
`new ArrayList<>()`
--
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]