LUCENE-5844: use RUE.NUM_BYTES_ARRAY_HEADER instead of 8

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1613043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2014-07-24 09:07:40 +00:00
parent 4b40a46634
commit 6b5f5bab08
1 changed files with 2 additions and 4 deletions

View File

@ -28,10 +28,8 @@ import java.util.Comparator;
public final class ArrayUtil {
/** Maximum length for an array (Integer.MAX_VALUE - 8). stackoverflow
* consensus seems to be this value and it's also what ArrayList.java
* uses as its limit. */
public static final int MAX_ARRAY_LENGTH = Integer.MAX_VALUE - 8;
/** Maximum length for an array (Integer.MAX_VALUE - RamUsageEstimator.NUM_BYTES_ARRAY_HEADER). */
public static final int MAX_ARRAY_LENGTH = Integer.MAX_VALUE - RamUsageEstimator.NUM_BYTES_ARRAY_HEADER;
private ArrayUtil() {} // no instance