aboutsummaryrefslogtreecommitdiff
path: root/guava/src/com/google/common/collect/RegularImmutableAsList.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava/src/com/google/common/collect/RegularImmutableAsList.java')
-rw-r--r--guava/src/com/google/common/collect/RegularImmutableAsList.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/guava/src/com/google/common/collect/RegularImmutableAsList.java b/guava/src/com/google/common/collect/RegularImmutableAsList.java
index 0e3fe4ec8..bc4d8ae5d 100644
--- a/guava/src/com/google/common/collect/RegularImmutableAsList.java
+++ b/guava/src/com/google/common/collect/RegularImmutableAsList.java
@@ -18,6 +18,7 @@ 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.function.Consumer;
import javax.annotation.CheckForNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -91,4 +92,13 @@ class RegularImmutableAsList<E> extends ImmutableAsList<E> {
public E get(int index) {
return delegateList.get(index);
}
+
+ // redeclare to help optimizers with b/310253115
+ @SuppressWarnings("RedundantOverride")
+ @Override
+ @J2ktIncompatible // serialization
+ @GwtIncompatible // serialization
+ Object writeReplace() {
+ return super.writeReplace();
+ }
}