rdblue commented on a change in pull request #3260:
URL: https://github.com/apache/iceberg/pull/3260#discussion_r725674307
##########
File path: api/src/main/java/org/apache/iceberg/Metrics.java
##########
@@ -230,7 +230,7 @@ private void readObject(ObjectInputStream in) throws
IOException, ClassNotFoundE
return null;
} else {
- Map<Integer, ByteBuffer> result = new HashMap<>(size);
+ Map<Integer, ByteBuffer> result = Maps.newHashMapWithExpectedSize(size);
Review comment:
+1 This is one of the reasons why we prefer using factory methods in
`Maps`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]