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

Comparing jsr166/src/test/tck/ScheduledExecutorTest.java (file contents):
Revision 1.81 by jsr166, Wed Aug 24 22:22:39 2016 UTC vs.
Revision 1.82 by jsr166, Thu Sep 15 17:31:16 2016 UTC

# Line 510 | Line 510 | public class ScheduledExecutorTest exten
510       * isShutdown is false before shutdown, true after
511       */
512      public void testIsShutdown() {
513
513          final ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
514 <        try {
515 <            assertFalse(p.isShutdown());
516 <        }
517 <        finally {
518 <            try { p.shutdown(); } catch (SecurityException ok) { return; }
514 >        assertFalse(p.isShutdown());
515 >        try (PoolCleaner cleaner = cleaner(p)) {
516 >            try {
517 >                p.shutdown();
518 >                assertTrue(p.isShutdown());
519 >            } catch (SecurityException ok) {}
520          }
521        assertTrue(p.isShutdown());
521      }
522  
523      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines