Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87a845ce authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #25656837: Static initialization order bug in ArrayMap leading to NPEs"

parents 0e57034a 894ce60a
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -59,6 +59,11 @@ public final class ArrayMap<K, V> implements Map<K, V> {
     */
    private static final int CACHE_SIZE = 10;

    /**
     * Special hash array value that indicates the container is immutable.
     */
    static final int[] EMPTY_IMMUTABLE_INTS = new int[0];

    /**
     * @hide Special immutable empty ArrayMap.
     */
@@ -75,11 +80,6 @@ public final class ArrayMap<K, V> implements Map<K, V> {
    static Object[] mTwiceBaseCache;
    static int mTwiceBaseCacheSize;

    /**
     * Special hash array value that indicates the container is immutable.
     */
    static final int[] EMPTY_IMMUTABLE_INTS = new int[0];

    int[] mHashes;
    Object[] mArray;
    int mSize;