Skip to content

Commit

Permalink
Fix a warning in a test about the Integer constructor going away
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 713450168
  • Loading branch information
lukesandberg authored and Guice Team committed Jan 9, 2025
1 parent 552f30e commit f2fb8af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/test/com/google/inject/matcher/MatcherTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,13 @@ public void testOnly() {
assertFalse(only(1).equals(only(2)));
}

@SuppressWarnings("UnnecessaryBoxing")
public void testIdenticalTo() {
Object o = new Object();
assertEquals("identicalTo(1)", identicalTo(1).toString());
assertTrue(identicalTo(o).matches(o));
assertFalse(identicalTo(o).matches(new Object()));
assertEqualsBothWays(identicalTo(o), identicalTo(o));
assertFalse(identicalTo(1).equals(identicalTo(new Integer(1))));
assertFalse(identicalTo("hello").equals(identicalTo(new String("hello"))));
}

public void testInPackage() {
Expand Down

0 comments on commit f2fb8af

Please sign in to comment.