diff options
Diffstat (limited to 'guava/src/com/google/common/collect/CompactHashMap.java')
-rw-r--r-- | guava/src/com/google/common/collect/CompactHashMap.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guava/src/com/google/common/collect/CompactHashMap.java b/guava/src/com/google/common/collect/CompactHashMap.java index 83f27f8e6..c5cac7ca5 100644 --- a/guava/src/com/google/common/collect/CompactHashMap.java +++ b/guava/src/com/google/common/collect/CompactHashMap.java @@ -31,6 +31,7 @@ import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.CanIgnoreReturnValue; +import com.google.errorprone.annotations.concurrent.LazyInit; import com.google.j2objc.annotations.WeakOuter; import java.io.IOException; import java.io.InvalidObjectException; @@ -688,7 +689,7 @@ class CompactHashMap<K extends @Nullable Object, V extends @Nullable Object> } } - @CheckForNull private transient Set<K> keySetView; + @LazyInit @CheckForNull private transient Set<K> keySetView; @Override public Set<K> keySet() { @@ -798,7 +799,7 @@ class CompactHashMap<K extends @Nullable Object, V extends @Nullable Object> } } - @CheckForNull private transient Set<Entry<K, V>> entrySetView; + @LazyInit @CheckForNull private transient Set<Entry<K, V>> entrySetView; @Override public Set<Entry<K, V>> entrySet() { @@ -981,7 +982,7 @@ class CompactHashMap<K extends @Nullable Object, V extends @Nullable Object> return false; } - @CheckForNull private transient Collection<V> valuesView; + @LazyInit @CheckForNull private transient Collection<V> valuesView; @Override public Collection<V> values() { |