aboutsummaryrefslogtreecommitdiff
path: root/guava/src/com/google/common/collect/SingletonImmutableBiMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava/src/com/google/common/collect/SingletonImmutableBiMap.java')
-rw-r--r--guava/src/com/google/common/collect/SingletonImmutableBiMap.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/guava/src/com/google/common/collect/SingletonImmutableBiMap.java b/guava/src/com/google/common/collect/SingletonImmutableBiMap.java
index c5fb2b298..c2f4ae137 100644
--- a/guava/src/com/google/common/collect/SingletonImmutableBiMap.java
+++ b/guava/src/com/google/common/collect/SingletonImmutableBiMap.java
@@ -20,6 +20,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.CollectPreconditions.checkEntryNotNull;
import com.google.common.annotations.GwtCompatible;
+import com.google.common.annotations.GwtIncompatible;
+import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.concurrent.LazyInit;
import com.google.j2objc.annotations.RetainedWith;
import java.util.function.BiConsumer;
@@ -110,4 +112,13 @@ final class SingletonImmutableBiMap<K, V> extends ImmutableBiMap<K, V> {
}
}
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}