summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2015-12-08 00:37:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-12-08 00:37:43 +0000
commit87a845ce3b762c42e57ea718c2fe004ffa76b18c (patch)
treeba8d5597ee1669d3ed68a86f4b48986748f2ebc3
parent0e57034afda4492b602d450c4ab4240e8e1d26d8 (diff)
parent894ce60a9f39c709c52c3405ef0e29d7bea93217 (diff)
Merge "Fix issue #25656837: Static initialization order bug in ArrayMap leading to NPEs"
-rw-r--r--core/java/android/util/ArrayMap.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/util/ArrayMap.java b/core/java/android/util/ArrayMap.java
index 4ee9807da850..bdb1fdcb9ff8 100644
--- a/core/java/android/util/ArrayMap.java
+++ b/core/java/android/util/ArrayMap.java
@@ -60,6 +60,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.
*/
public static final ArrayMap EMPTY = new ArrayMap(true);
@@ -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;