aboutsummaryrefslogtreecommitdiff
path: root/guava/src/com/google/common/collect/JdkBackedImmutableSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava/src/com/google/common/collect/JdkBackedImmutableSet.java')
-rw-r--r--guava/src/com/google/common/collect/JdkBackedImmutableSet.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/guava/src/com/google/common/collect/JdkBackedImmutableSet.java b/guava/src/com/google/common/collect/JdkBackedImmutableSet.java
index c00167713..bee7076fa 100644
--- a/guava/src/com/google/common/collect/JdkBackedImmutableSet.java
+++ b/guava/src/com/google/common/collect/JdkBackedImmutableSet.java
@@ -15,6 +15,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 java.util.Set;
import javax.annotation.CheckForNull;
@@ -55,4 +57,13 @@ final class JdkBackedImmutableSet<E> extends IndexedImmutableSet<E> {
public int size() {
return delegateList.size();
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}