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

Commit abc88d07 authored by Adam Lesinski's avatar Adam Lesinski Committed by Android Git Automerger
Browse files

am 967439b4: Merge "Make ArrayMap.EMPTY immutable" into lmp-mr1-dev

* commit '967439b4':
  Make ArrayMap.EMPTY immutable
parents 29039a2b 967439b4
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -255,7 +255,10 @@ public final class ArrayMap<K, V> implements Map<K, V> {
    }
    }


    private ArrayMap(boolean immutable) {
    private ArrayMap(boolean immutable) {
        mHashes = EmptyArray.INT;
        // If this is immutable, use the sentinal EMPTY_IMMUTABLE_INTS
        // instance instead of the usual EmptyArray.INT. The reference
        // is checked later to see if the array is allowed to grow.
        mHashes = immutable ? EMPTY_IMMUTABLE_INTS : EmptyArray.INT;
        mArray = EmptyArray.OBJECT;
        mArray = EmptyArray.OBJECT;
        mSize = 0;
        mSize = 0;
    }
    }