769 |
|
for(int i = 1; i < 5; ++i) { |
770 |
|
assertTrue(tasks[i].done); |
771 |
|
} |
772 |
+ |
try { p.shutdownNow(); } catch(SecurityException ok) { return; } |
773 |
|
} catch(RejectedExecutionException ex){ |
774 |
|
unexpectedException(); |
775 |
|
} finally { |
796 |
|
for(int i = 0; i < 5; ++i){ |
797 |
|
assertFalse(tasks[i].done); |
798 |
|
} |
799 |
+ |
try { p.shutdownNow(); } catch(SecurityException ok) { return; } |
800 |
|
} catch(RejectedExecutionException ex){ |
801 |
|
unexpectedException(); |
802 |
|
} finally { |
819 |
|
p.execute(r3); |
820 |
|
assertFalse(p.getQueue().contains(r2)); |
821 |
|
assertTrue(p.getQueue().contains(r3)); |
822 |
+ |
try { p.shutdownNow(); } catch(SecurityException ok) { return; } |
823 |
|
} catch(RejectedExecutionException ex){ |
824 |
|
unexpectedException(); |
825 |
|
} finally { |