--- jsr166/src/test/tck/JSR166TestCase.java 2019/01/10 04:35:16 1.252 +++ jsr166/src/test/tck/JSR166TestCase.java 2019/02/22 19:27:47 1.253 @@ -1750,12 +1750,11 @@ public class JSR166TestCase extends Test } } - void assertImmutable(final Object o) { + void assertImmutable(Object o) { if (o instanceof Collection) { assertThrows( UnsupportedOperationException.class, - new Runnable() { public void run() { - ((Collection) o).add(null);}}); + () -> ((Collection) o).add(null)); } } @@ -1815,8 +1814,8 @@ public class JSR166TestCase extends Test } public void assertThrows(Class expectedExceptionClass, - Runnable... throwingActions) { - for (Runnable throwingAction : throwingActions) { + Action... throwingActions) { + for (Action throwingAction : throwingActions) { boolean threw = false; try { throwingAction.run(); } catch (Throwable t) {