ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.252 by jsr166, Thu Jan 10 04:35:16 2019 UTC vs.
Revision 1.253 by jsr166, Fri Feb 22 19:27:47 2019 UTC

# Line 1750 | Line 1750 | public class JSR166TestCase extends Test
1750          }
1751      }
1752  
1753 <    void assertImmutable(final Object o) {
1753 >    void assertImmutable(Object o) {
1754          if (o instanceof Collection) {
1755              assertThrows(
1756                  UnsupportedOperationException.class,
1757 <                new Runnable() { public void run() {
1758 <                        ((Collection) o).add(null);}});
1757 >                () -> ((Collection) o).add(null));
1758          }
1759      }
1760  
# Line 1815 | Line 1814 | public class JSR166TestCase extends Test
1814      }
1815  
1816      public void assertThrows(Class<? extends Throwable> expectedExceptionClass,
1817 <                             Runnable... throwingActions) {
1818 <        for (Runnable throwingAction : throwingActions) {
1817 >                             Action... throwingActions) {
1818 >        for (Action throwingAction : throwingActions) {
1819              boolean threw = false;
1820              try { throwingAction.run(); }
1821              catch (Throwable t) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines