Skip to content

Commit 45f57f3

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Apply InlineMe, or suppress where appropriate.
RELNOTES=n/a PiperOrigin-RevId: 725859649
1 parent 16d1e07 commit 45f57f3

File tree

24 files changed

+56
-24
lines changed

24 files changed

+56
-24
lines changed

android/guava-tests/test/com/google/common/base/CharMatcherTest.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,11 @@ private void doTestNoMatchThenMatch(CharMatcher matcher, String s) {
362362
reallyTestMatchThenNoMatch(matcher.precomputed().negate(), s);
363363
}
364364

365-
@SuppressWarnings("deprecation") // intentionally testing apply() method
365+
// intentionally testing apply() method
366+
@SuppressWarnings({
367+
"deprecation",
368+
"InlineMeInliner",
369+
})
366370
private void reallyTestOneCharMatch(CharMatcher matcher, String s) {
367371
assertTrue(matcher.matches(s.charAt(0)));
368372
assertTrue(matcher.apply(s.charAt(0)));
@@ -380,7 +384,11 @@ private void reallyTestOneCharMatch(CharMatcher matcher, String s) {
380384
assertEquals(1, matcher.countIn(s));
381385
}
382386

383-
@SuppressWarnings("deprecation") // intentionally testing apply() method
387+
// intentionally testing apply() method
388+
@SuppressWarnings({
389+
"deprecation",
390+
"InlineMeInliner",
391+
})
384392
private void reallyTestOneCharNoMatch(CharMatcher matcher, String s) {
385393
assertFalse(matcher.matches(s.charAt(0)));
386394
assertFalse(matcher.apply(s.charAt(0)));

android/guava-tests/test/com/google/common/collect/ComparisonChainTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public int compareTo(DontCompareMe o) {
4040
}
4141
}
4242

43-
@SuppressWarnings("deprecation")
43+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
4444
public void testCompareBooleans() {
4545
assertThat(
4646
ComparisonChain.start()

android/guava-tests/test/com/google/common/collect/IterablesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ public void testUnmodifiableIterable() {
879879
assertEquals("[a, b, c]", iterable.toString());
880880
}
881881

882-
@SuppressWarnings("deprecation") // test of deprecated method
882+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
883883
public void testUnmodifiableIterableShortCircuit() {
884884
List<String> list = newArrayList("a", "b", "c");
885885
Iterable<String> iterable = Iterables.unmodifiableIterable(list);

android/guava-tests/test/com/google/common/collect/IteratorsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ public void testIndexOf_consumedDataNoMatch() {
15261526
assertFalse(iterator.hasNext());
15271527
}
15281528

1529-
@SuppressWarnings("deprecation")
1529+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
15301530
public void testUnmodifiableIteratorShortCircuit() {
15311531
Iterator<String> mod = Lists.newArrayList("a", "b", "c").iterator();
15321532
UnmodifiableIterator<String> unmod = Iterators.unmodifiableIterator(mod);
@@ -1535,7 +1535,7 @@ public void testUnmodifiableIteratorShortCircuit() {
15351535
assertSame(unmod, Iterators.unmodifiableIterator((Iterator<String>) unmod));
15361536
}
15371537

1538-
@SuppressWarnings("deprecation")
1538+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
15391539
public void testPeekingIteratorShortCircuit() {
15401540
Iterator<String> nonpeek = Lists.newArrayList("a", "b", "c").iterator();
15411541
PeekingIterator<String> peek = Iterators.peekingIterator(nonpeek);

android/guava-tests/test/com/google/common/collect/MultimapsTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class MultimapsTest extends TestCase {
8181
private static final Comparator<Integer> INT_COMPARATOR =
8282
Ordering.<Integer>natural().reverse().nullsFirst();
8383

84-
@SuppressWarnings("deprecation")
84+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
8585
public void testUnmodifiableListMultimapShortCircuit() {
8686
ListMultimap<String, Integer> mod = ArrayListMultimap.create();
8787
ListMultimap<String, Integer> unmod = Multimaps.unmodifiableListMultimap(mod);
@@ -94,7 +94,7 @@ public void testUnmodifiableListMultimapShortCircuit() {
9494
immutable, Multimaps.unmodifiableListMultimap((ListMultimap<String, Integer>) immutable));
9595
}
9696

97-
@SuppressWarnings("deprecation")
97+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
9898
public void testUnmodifiableSetMultimapShortCircuit() {
9999
SetMultimap<String, Integer> mod = HashMultimap.create();
100100
SetMultimap<String, Integer> unmod = Multimaps.unmodifiableSetMultimap(mod);
@@ -107,7 +107,7 @@ public void testUnmodifiableSetMultimapShortCircuit() {
107107
immutable, Multimaps.unmodifiableSetMultimap((SetMultimap<String, Integer>) immutable));
108108
}
109109

110-
@SuppressWarnings("deprecation")
110+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
111111
public void testUnmodifiableMultimapShortCircuit() {
112112
Multimap<String, Integer> mod = HashMultimap.create();
113113
Multimap<String, Integer> unmod = Multimaps.unmodifiableMultimap(mod);

android/guava-tests/test/com/google/common/collect/MultisetsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public void testRemoveOccurrencesMultisetIterable() {
253253
assertThat(multiset).containsExactly("a", "c").inOrder();
254254
}
255255

256-
@SuppressWarnings("deprecation")
256+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
257257
public void testUnmodifiableMultisetShortCircuit() {
258258
Multiset<String> mod = HashMultiset.create();
259259
Multiset<String> unmod = unmodifiableMultiset(mod);

android/guava-tests/test/com/google/common/collect/OrderingTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void testFrom() {
133133
assertTrue(caseInsensitiveOrdering.compare("a", "B") < 0);
134134
assertTrue(caseInsensitiveOrdering.compare("B", "a") > 0);
135135

136-
@SuppressWarnings("deprecation") // test of deprecated method
136+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
137137
Ordering<String> orderingFromOrdering = Ordering.from(Ordering.<String>natural());
138138
new EqualsTester()
139139
.addEqualityGroup(caseInsensitiveOrdering, Ordering.from(String.CASE_INSENSITIVE_ORDER))
@@ -442,6 +442,7 @@ public void testNullsLast() {
442442
.testEquals();
443443
}
444444

445+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
445446
public void testBinarySearch() {
446447
List<Integer> ints = Lists.newArrayList(0, 2, 3, 5, 7, 9);
447448
assertEquals(4, numberOrdering.binarySearch(ints, 7));
@@ -966,6 +967,7 @@ void testMinAndMax() {
966967
assertEquals(max, ordering.max(max, min));
967968
}
968969

970+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
969971
void testBinarySearch() {
970972
for (int i = 0; i < strictlyOrderedList.size(); i++) {
971973
assertEquals(i, ordering.binarySearch(strictlyOrderedList, strictlyOrderedList.get(i)));

android/guava-tests/test/com/google/common/collect/SetsTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ public void testNullPointerExceptions() {
662662
}
663663

664664
public void testNewSetFromMap() {
665+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
665666
Set<Integer> set = Sets.newSetFromMap(new HashMap<Integer, Boolean>());
666667
set.addAll(SOME_COLLECTION);
667668
verifySetContents(set, SOME_COLLECTION);
@@ -670,12 +671,14 @@ public void testNewSetFromMap() {
670671
@J2ktIncompatible
671672
@GwtIncompatible // SerializableTester
672673
public void testNewSetFromMapSerialization() {
674+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
673675
Set<Integer> set = Sets.newSetFromMap(new LinkedHashMap<Integer, Boolean>());
674676
set.addAll(SOME_COLLECTION);
675677
Set<Integer> copy = SerializableTester.reserializeAndAssert(set);
676678
assertThat(copy).containsExactly(0, 1).inOrder();
677679
}
678680

681+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
679682
public void testNewSetFromMapIllegal() {
680683
Map<Integer, Boolean> map = new LinkedHashMap<>();
681684
map.put(2, true);

android/guava-tests/test/com/google/common/collect/TreeBasedTableTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public void testValuesToString_ordered() {
155155
assertEquals("[b, a, c]", table.values().toString());
156156
}
157157

158+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
158159
public void testRowComparator() {
159160
sortedTable = TreeBasedTable.create();
160161
assertSame(Ordering.natural(), sortedTable.rowComparator());

android/guava-tests/test/com/google/common/hash/BloomFilterTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ public void testLargeNumberOfInsertions() {
304304
unused = BloomFilter.create(Funnels.unencodedCharsFunnel(), 45L * Integer.MAX_VALUE, 0.99);
305305
}
306306

307+
@SuppressWarnings({"deprecation", "InlineMeInliner"}) // test of a deprecated method
307308
private static void checkSanity(BloomFilter<Object> bf) {
308309
assertFalse(bf.mightContain(new Object()));
309310
assertFalse(bf.apply(new Object()));

0 commit comments

Comments
 (0)