aboutsummaryrefslogtreecommitdiff
path: root/android/guava/src/com/google/common/collect/RegularImmutableSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/guava/src/com/google/common/collect/RegularImmutableSet.java')
-rw-r--r--android/guava/src/com/google/common/collect/RegularImmutableSet.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/android/guava/src/com/google/common/collect/RegularImmutableSet.java b/android/guava/src/com/google/common/collect/RegularImmutableSet.java
index 2382ef62e..790aa6453 100644
--- a/android/guava/src/com/google/common/collect/RegularImmutableSet.java
+++ b/android/guava/src/com/google/common/collect/RegularImmutableSet.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.annotations.VisibleForTesting;
import javax.annotation.CheckForNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -120,4 +122,13 @@ final class RegularImmutableSet<E> extends ImmutableSet<E> {
boolean isHashCodeFast() {
return true;
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}