aboutsummaryrefslogtreecommitdiff
path: root/android/guava/src/com/google/common/collect/RegularImmutableMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/guava/src/com/google/common/collect/RegularImmutableMap.java')
-rw-r--r--android/guava/src/com/google/common/collect/RegularImmutableMap.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/android/guava/src/com/google/common/collect/RegularImmutableMap.java b/android/guava/src/com/google/common/collect/RegularImmutableMap.java
index d6d214b65..100e06129 100644
--- a/android/guava/src/com/google/common/collect/RegularImmutableMap.java
+++ b/android/guava/src/com/google/common/collect/RegularImmutableMap.java
@@ -22,6 +22,7 @@ import static com.google.common.collect.CollectPreconditions.checkEntryNotNull;
import static java.util.Objects.requireNonNull;
import com.google.common.annotations.GwtCompatible;
+import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.annotations.VisibleForTesting;
import java.util.AbstractMap;
@@ -435,6 +436,14 @@ final class RegularImmutableMap<K, V> extends ImmutableMap<K, V> {
public boolean isPartialView() {
return true;
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
};
}
@@ -458,6 +467,15 @@ final class RegularImmutableMap<K, V> extends ImmutableMap<K, V> {
public int size() {
return size;
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}
@Override
@@ -495,6 +513,13 @@ final class RegularImmutableMap<K, V> extends ImmutableMap<K, V> {
public int size() {
return size;
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}
static final class KeySet<K> extends ImmutableSet<K> {
@@ -535,6 +560,15 @@ final class RegularImmutableMap<K, V> extends ImmutableMap<K, V> {
public int size() {
return map.size();
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}
@SuppressWarnings("unchecked")
@@ -548,6 +582,15 @@ final class RegularImmutableMap<K, V> extends ImmutableMap<K, V> {
return false;
}
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
+
// This class is never actually serialized directly, but we have to make the
// warning go away (and suppressing would suppress for all nested classes too)
@J2ktIncompatible // serialization