Skip to content

Commit

Permalink
Remove workarounds for a bug in Java 5.
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 707669474
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Dec 19, 2024
1 parent a0b90e7 commit 4382c2c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ public void testCopyOf_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
Set<String> set = copyOf(c);
assertEquals(Collections.<String>emptySet(), set);
assertSame(this.<String>of(), set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ public void testCopyOf_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
List<String> list = ImmutableList.copyOf(c);
assertEquals(emptyList(), list);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ public void testCreation_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
Multiset<String> multiset = ImmutableMultiset.copyOf(c);
assertTrue(multiset.isEmpty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ public void testCreation_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
Multiset<String> multiset = ImmutableSortedMultiset.copyOf(c);
assertTrue(multiset.isEmpty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ public void testCopyOf_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
Set<String> set = copyOf(c);
assertEquals(Collections.<String>emptySet(), set);
assertSame(this.<String>of(), set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ public void testCopyOf_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
List<String> list = ImmutableList.copyOf(c);
assertEquals(emptyList(), list);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ public void testCreation_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
Multiset<String> multiset = ImmutableMultiset.copyOf(c);
assertTrue(multiset.isEmpty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ public void testCreation_arrayContainingOnlyNull() {
}

public void testCopyOf_collection_empty() {
// "<String>" is required to work around a javac 1.5 bug.
Collection<String> c = MinimalCollection.<String>of();
Collection<String> c = MinimalCollection.of();
Multiset<String> multiset = ImmutableSortedMultiset.copyOf(c);
assertTrue(multiset.isEmpty());
}
Expand Down

0 comments on commit 4382c2c

Please sign in to comment.