Skip to content

Commit

Permalink
Use assertThrows()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jul 26, 2024
1 parent 6c2e479 commit b1571cb
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ public void testRemove() {

if (!supportsRemove()) {
// check for UnsupportedOperationException if not supported
try {
it.remove();
} catch (final UnsupportedOperationException ex) {
}
assertThrows(UnsupportedOperationException.class, it::remove);
return;
}

Expand Down

0 comments on commit b1571cb

Please sign in to comment.