Skip to content

Commit 59e3f8a

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Remove obsolete @GwtTransient.
And make a field `private` while in the area. RELNOTES=n/a PiperOrigin-RevId: 784620182
1 parent 5a37594 commit 59e3f8a

File tree

9 files changed

+9
-101
lines changed

9 files changed

+9
-101
lines changed

android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -470,24 +470,14 @@ Iterable<Entry<K, V>> orderEntriesByKey(List<Entry<K, V>> insertionOrder) {
470470
return insertionOrder;
471471
}
472472

473-
/**
474-
* Private replacement for {@link com.google.gwt.user.client.rpc.GwtTransient} to work around
475-
* build-system quirks.
476-
*/
477-
private @interface GwtTransient {}
478-
479473
/**
480474
* Compares strings in natural order except that null comes immediately before a given value. This
481475
* works better than Ordering.natural().nullsFirst() because, if null comes before all other
482476
* values, it lies outside the submap/submultiset ranges we test, and the variety of tests that
483477
* exercise null handling fail on those subcollections.
484478
*/
485479
public abstract static class NullsBefore implements Comparator<@Nullable String>, Serializable {
486-
/*
487-
* We don't serialize this class in GWT, so we don't care about whether GWT will serialize this
488-
* field.
489-
*/
490-
@GwtTransient private final String justAfterNull;
480+
private final String justAfterNull;
491481

492482
protected NullsBefore(String justAfterNull) {
493483
if (justAfterNull == null) {

android/guava/src/com/google/common/collect/AbstractSortedMultiset.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@GwtCompatible(emulated = true)
3737
abstract class AbstractSortedMultiset<E extends @Nullable Object> extends AbstractMultiset<E>
3838
implements SortedMultiset<E> {
39-
@GwtTransient final Comparator<? super E> comparator;
39+
private final Comparator<? super E> comparator;
4040

4141
// needed for serialization
4242
@SuppressWarnings("unchecked")

android/guava/src/com/google/common/collect/GwtTransient.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

android/guava/src/com/google/common/collect/StandardTable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
*/
7272
@GwtCompatible
7373
class StandardTable<R, C, V> extends AbstractTable<R, C, V> implements Serializable {
74-
@GwtTransient final Map<R, Map<C, V>> backingMap;
75-
@GwtTransient final Supplier<? extends Map<C, V>> factory;
74+
final Map<R, Map<C, V>> backingMap;
75+
final Supplier<? extends Map<C, V>> factory;
7676

7777
StandardTable(Map<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) {
7878
this.backingMap = backingMap;

guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/AbstractSortedMultiset.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@GwtCompatible(emulated = true)
3535
abstract class AbstractSortedMultiset<E extends @Nullable Object> extends AbstractMultiset<E>
3636
implements SortedMultiset<E> {
37-
@GwtTransient final Comparator<? super E> comparator;
37+
private final Comparator<? super E> comparator;
3838

3939
// needed for serialization
4040
@SuppressWarnings("unchecked")

guava-testlib/src/com/google/common/collect/testing/Helpers.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -470,24 +470,14 @@ Iterable<Entry<K, V>> orderEntriesByKey(List<Entry<K, V>> insertionOrder) {
470470
return insertionOrder;
471471
}
472472

473-
/**
474-
* Private replacement for {@link com.google.gwt.user.client.rpc.GwtTransient} to work around
475-
* build-system quirks.
476-
*/
477-
private @interface GwtTransient {}
478-
479473
/**
480474
* Compares strings in natural order except that null comes immediately before a given value. This
481475
* works better than Ordering.natural().nullsFirst() because, if null comes before all other
482476
* values, it lies outside the submap/submultiset ranges we test, and the variety of tests that
483477
* exercise null handling fail on those subcollections.
484478
*/
485479
public abstract static class NullsBefore implements Comparator<@Nullable String>, Serializable {
486-
/*
487-
* We don't serialize this class in GWT, so we don't care about whether GWT will serialize this
488-
* field.
489-
*/
490-
@GwtTransient private final String justAfterNull;
480+
private final String justAfterNull;
491481

492482
protected NullsBefore(String justAfterNull) {
493483
if (justAfterNull == null) {

guava/src/com/google/common/collect/AbstractSortedMultiset.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@GwtCompatible(emulated = true)
3737
abstract class AbstractSortedMultiset<E extends @Nullable Object> extends AbstractMultiset<E>
3838
implements SortedMultiset<E> {
39-
@GwtTransient final Comparator<? super E> comparator;
39+
private final Comparator<? super E> comparator;
4040

4141
// needed for serialization
4242
@SuppressWarnings("unchecked")

guava/src/com/google/common/collect/GwtTransient.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

guava/src/com/google/common/collect/StandardTable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
*/
7474
@GwtCompatible
7575
class StandardTable<R, C, V> extends AbstractTable<R, C, V> implements Serializable {
76-
@GwtTransient final Map<R, Map<C, V>> backingMap;
77-
@GwtTransient final Supplier<? extends Map<C, V>> factory;
76+
final Map<R, Map<C, V>> backingMap;
77+
final Supplier<? extends Map<C, V>> factory;
7878

7979
StandardTable(Map<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) {
8080
this.backingMap = backingMap;

0 commit comments

Comments
 (0)