Closed kluever closed 2 years ago
Which version of java were you able to replicate this issue?
At Google, we've enabled CheckReturnValue by default, so all non-void APIs that are not annotated with @CanIgnoreReturnValue
must have their values used. This has caught thousands of bugs so far, and we hope to be open sourcing this soon!
@bhuvanaindukuri if you send me a pull request doing that I would approve it. Alternately we could have the code assert that the message contained a string.
Note these tests are very old. They verify the JUnit 3.x assertion code
Asking @marcphilipp or @sbrannen to provide a second approval, then I can merge.
Which version of java were you able to replicate this issue? Also isn't it better to replace the line
e.getMessage();
with eitherassertTrue(true);
or just remove the statement altogether as done in other methods like "testAssertNullNotEqualsString"