aboutsummaryrefslogtreecommitdiff
path: root/android/guava/src/com/google/common/collect/RegularImmutableAsList.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/guava/src/com/google/common/collect/RegularImmutableAsList.java')
-rw-r--r--android/guava/src/com/google/common/collect/RegularImmutableAsList.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/android/guava/src/com/google/common/collect/RegularImmutableAsList.java b/android/guava/src/com/google/common/collect/RegularImmutableAsList.java
index e344db1ea..928506e44 100644
--- a/android/guava/src/com/google/common/collect/RegularImmutableAsList.java
+++ b/android/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 javax.annotation.CheckForNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -89,4 +90,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();
+ }
}