diff options
Diffstat (limited to 'android/guava/src/com/google/common/collect/RegularImmutableMultiset.java')
-rw-r--r-- | android/guava/src/com/google/common/collect/RegularImmutableMultiset.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/android/guava/src/com/google/common/collect/RegularImmutableMultiset.java b/android/guava/src/com/google/common/collect/RegularImmutableMultiset.java index 6fbc099c8..0e59465ad 100644 --- a/android/guava/src/com/google/common/collect/RegularImmutableMultiset.java +++ b/android/guava/src/com/google/common/collect/RegularImmutableMultiset.java @@ -16,6 +16,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 com.google.common.collect.Multiset.Entry; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.concurrent.LazyInit; @@ -93,6 +94,15 @@ class RegularImmutableMultiset<E> extends ImmutableMultiset<E> { public int size() { return contents.size(); } + + // redeclare to help optimizers with b/310253115 + @SuppressWarnings("RedundantOverride") + @Override + @J2ktIncompatible // serialization + @GwtIncompatible // serialization + Object writeReplace() { + return super.writeReplace(); + } } @Override @@ -130,8 +140,9 @@ class RegularImmutableMultiset<E> extends ImmutableMultiset<E> { private static final long serialVersionUID = 0; } - @GwtIncompatible @Override + @J2ktIncompatible // serialization + @GwtIncompatible // serialization Object writeReplace() { return new SerializedForm(this); } |