diff options
Diffstat (limited to 'android/guava/src/com/google/common/collect/RegularImmutableTable.java')
-rw-r--r-- | android/guava/src/com/google/common/collect/RegularImmutableTable.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/android/guava/src/com/google/common/collect/RegularImmutableTable.java b/android/guava/src/com/google/common/collect/RegularImmutableTable.java index 337f123b6..03def2cbc 100644 --- a/android/guava/src/com/google/common/collect/RegularImmutableTable.java +++ b/android/guava/src/com/google/common/collect/RegularImmutableTable.java @@ -18,6 +18,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.j2objc.annotations.WeakOuter; import java.util.Collections; import java.util.Comparator; @@ -69,6 +71,15 @@ abstract class RegularImmutableTable<R, C, V> extends ImmutableTable<R, C, V> { boolean isPartialView() { return false; } + + // redeclare to help optimizers with b/310253115 + @SuppressWarnings("RedundantOverride") + @Override + @J2ktIncompatible // serialization + @GwtIncompatible // serialization + Object writeReplace() { + return super.writeReplace(); + } } abstract V getValue(int iterationIndex); @@ -94,6 +105,15 @@ abstract class RegularImmutableTable<R, C, V> extends ImmutableTable<R, C, V> { boolean isPartialView() { return true; } + + // redeclare to help optimizers with b/310253115 + @SuppressWarnings("RedundantOverride") + @Override + @J2ktIncompatible // serialization + @GwtIncompatible // serialization + Object writeReplace() { + return super.writeReplace(); + } } static <R, C, V> RegularImmutableTable<R, C, V> forCells( @@ -181,4 +201,10 @@ abstract class RegularImmutableTable<R, C, V> extends ImmutableTable<R, C, V> { newValue, existingValue); } + + // redeclare to satisfy our test for b/310253115 + @Override + @J2ktIncompatible // serialization + @GwtIncompatible // serialization + abstract Object writeReplace(); } |