advancedxy commented on code in PR #8336:
URL: https://github.com/apache/iceberg/pull/8336#discussion_r1296825297
##########
core/src/main/java/org/apache/iceberg/util/ArrayUtil.java:
##########
@@ -59,6 +61,14 @@ public static List<Long> toLongList(long[] longs) {
}
}
+ public static List<Long> toUnmodifiableLongList(long[] longs) {
+ if (longs != null) {
+ return Collections.unmodifiableList(Longs.asList(longs));
Review Comment:
Why not simply use `java.util.Arrays.asList(longs)` instead of Guava's
`Longs.asList`? Seems like they have the same characteristic. And the
Arrays.asList probably has more chance to get optimization in the newer version
of JDKs.
--
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]