aboutsummaryrefslogtreecommitdiff
path: root/android/guava/src/com/google/common/collect/SingletonImmutableSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/guava/src/com/google/common/collect/SingletonImmutableSet.java')
-rw-r--r--android/guava/src/com/google/common/collect/SingletonImmutableSet.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/android/guava/src/com/google/common/collect/SingletonImmutableSet.java b/android/guava/src/com/google/common/collect/SingletonImmutableSet.java
index 088cb802f..15db1c5e5 100644
--- a/android/guava/src/com/google/common/collect/SingletonImmutableSet.java
+++ b/android/guava/src/com/google/common/collect/SingletonImmutableSet.java
@@ -17,6 +17,8 @@
package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
+import com.google.common.annotations.GwtIncompatible;
+import com.google.common.annotations.J2ktIncompatible;
import com.google.common.base.Preconditions;
import javax.annotation.CheckForNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -80,4 +82,13 @@ final class SingletonImmutableSet<E> extends ImmutableSet<E> {
public String toString() {
return '[' + element.toString() + ']';
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}