diff --git a/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/collections/CollectionUtils.java b/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/collections/CollectionUtils.java index 4563f173c32..f08ba6cfa17 100644 --- a/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/collections/CollectionUtils.java +++ b/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/collections/CollectionUtils.java @@ -36,6 +36,8 @@ */ public class CollectionUtils { + // Maximum capacity for a hash based collection. (used internally by JDK). + // Also, it helps to avoid overflow errors when calculating the capacity private static final int MAX_CAPACITY = 1 << 30; private CollectionUtils() {