Skip to content

Commit

Permalink
Fix "ReturnValueIgnored" errors flagged by error-prone
Browse files Browse the repository at this point in the history
  • Loading branch information
kluever authored Oct 6, 2021
1 parent 7167b23 commit ec20483
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/java/junit/tests/framework/AssertTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ public void testAssertStringNotEqualsNull() {
assertEquals("foo", null);
fail();
} catch (ComparisonFailure e) {
e.getMessage(); // why no assertion?
String unused = e.getMessage(); // why no assertion?
}
}

public void testAssertNullNotEqualsNull() {
try {
assertEquals(null, new Object());
} catch (AssertionFailedError e) {
e.getMessage(); // why no assertion?
String unused = e.getMessage(); // why no assertion?
return;
}
fail();
Expand Down Expand Up @@ -168,4 +168,4 @@ public void testAssertNotSameFailsNull() {
}
fail();
}
}
}

0 comments on commit ec20483

Please sign in to comment.