aboutsummaryrefslogtreecommitdiff
path: root/guava/src/com/google/common/collect/RegularImmutableSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava/src/com/google/common/collect/RegularImmutableSet.java')
-rw-r--r--guava/src/com/google/common/collect/RegularImmutableSet.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/guava/src/com/google/common/collect/RegularImmutableSet.java b/guava/src/com/google/common/collect/RegularImmutableSet.java
index 211c89304..0db235d69 100644
--- a/guava/src/com/google/common/collect/RegularImmutableSet.java
+++ b/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 java.util.Spliterator;
import java.util.Spliterators;
@@ -124,4 +126,13 @@ final class RegularImmutableSet<E> extends ImmutableSet.CachingAsList<E> {
boolean isHashCodeFast() {
return true;
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}