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

Comparing jsr166/src/test/tck/ScheduledExecutorSubclassTest.java (file contents):
Revision 1.2 by jsr166, Mon Nov 2 20:28:31 2009 UTC vs.
Revision 1.3 by jsr166, Mon Nov 16 04:57:10 2009 UTC

# Line 84 | Line 84 | public class ScheduledExecutorSubclassTe
84              p1.execute(runnable);
85              assertFalse(runnable.done);
86              Thread.sleep(SHORT_DELAY_MS);
87 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
87 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
88              try {
89                  Thread.sleep(MEDIUM_DELAY_MS);
90 <            } catch(InterruptedException e){
90 >            } catch (InterruptedException e){
91                  unexpectedException();
92              }
93              assertTrue(runnable.done);
94 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
94 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
95              joinPool(p1);
96          }
97 <        catch(Exception e){
97 >        catch (Exception e){
98              unexpectedException();
99          }
100  
# Line 113 | Line 113 | public class ScheduledExecutorSubclassTe
113              Thread.sleep(MEDIUM_DELAY_MS);
114              assertTrue(callable.done);
115              assertEquals(Boolean.TRUE, f.get());
116 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
116 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
117              joinPool(p1);
118 <        } catch(RejectedExecutionException e){}
119 <        catch(Exception e){
118 >        } catch (RejectedExecutionException e){}
119 >        catch (Exception e){
120              e.printStackTrace();
121              unexpectedException();
122          }
# Line 134 | Line 134 | public class ScheduledExecutorSubclassTe
134              assertFalse(runnable.done);
135              Thread.sleep(MEDIUM_DELAY_MS);
136              assertTrue(runnable.done);
137 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
137 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
138              joinPool(p1);
139 <        } catch(Exception e){
139 >        } catch (Exception e){
140              unexpectedException();
141          }
142      }
# Line 154 | Line 154 | public class ScheduledExecutorSubclassTe
154              assertTrue(runnable.done);
155              h.cancel(true);
156              joinPool(p1);
157 <        } catch(Exception e){
157 >        } catch (Exception e){
158              unexpectedException();
159          }
160      }
# Line 177 | Line 177 | public class ScheduledExecutorSubclassTe
177              assertTrue(runnable.done);
178              h.cancel(true);
179              joinPool(p1);
180 <        } catch(Exception e){
180 >        } catch (Exception e){
181              unexpectedException();
182          }
183      }
# Line 199 | Line 199 | public class ScheduledExecutorSubclassTe
199              assertTrue(c >= SMALL_DELAY_MS / SHORT_DELAY_MS);
200              assertTrue(c <= SMALL_DELAY_MS + SHORT_DELAY_MS);
201              joinPool(p1);
202 <        } catch(Exception e){
202 >        } catch (Exception e){
203              unexpectedException();
204          }
205      }
# Line 219 | Line 219 | public class ScheduledExecutorSubclassTe
219              assertTrue(c >= SMALL_DELAY_MS / SHORT_DELAY_MS);
220              assertTrue(c <= SMALL_DELAY_MS + SHORT_DELAY_MS);
221              joinPool(p1);
222 <        } catch(Exception e){
222 >        } catch (Exception e){
223              unexpectedException();
224          }
225      }
# Line 234 | Line 234 | public class ScheduledExecutorSubclassTe
234              se = new CustomExecutor(1);
235              se.execute(null);
236              shouldThrow();
237 <        } catch(NullPointerException success){}
238 <        catch(Exception e){
237 >        } catch (NullPointerException success){}
238 >        catch (Exception e){
239              unexpectedException();
240          }
241  
# Line 251 | Line 251 | public class ScheduledExecutorSubclassTe
251              TrackedCallable callable = null;
252              Future f = se.schedule(callable, SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
253              shouldThrow();
254 <        } catch(NullPointerException success){}
255 <        catch(Exception e){
254 >        } catch (NullPointerException success){}
255 >        catch (Exception e){
256              unexpectedException();
257          }
258          joinPool(se);
# Line 268 | Line 268 | public class ScheduledExecutorSubclassTe
268              se.schedule(new NoOpRunnable(),
269                          MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
270              shouldThrow();
271 <        } catch(RejectedExecutionException success){
271 >        } catch (RejectedExecutionException success){
272          } catch (SecurityException ok) {
273          }
274  
# Line 286 | Line 286 | public class ScheduledExecutorSubclassTe
286              se.schedule(new NoOpCallable(),
287                          MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
288              shouldThrow();
289 <        } catch(RejectedExecutionException success){
289 >        } catch (RejectedExecutionException success){
290          } catch (SecurityException ok) {
291          }
292          joinPool(se);
# Line 302 | Line 302 | public class ScheduledExecutorSubclassTe
302              se.schedule(new NoOpCallable(),
303                          MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
304              shouldThrow();
305 <        } catch(RejectedExecutionException success){
305 >        } catch (RejectedExecutionException success){
306          } catch (SecurityException ok) {
307          }
308           joinPool(se);
# Line 318 | Line 318 | public class ScheduledExecutorSubclassTe
318              se.scheduleAtFixedRate(new NoOpRunnable(),
319                                     MEDIUM_DELAY_MS, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
320              shouldThrow();
321 <        } catch(RejectedExecutionException success){
321 >        } catch (RejectedExecutionException success){
322          } catch (SecurityException ok) {
323          }
324          joinPool(se);
# Line 334 | Line 334 | public class ScheduledExecutorSubclassTe
334              se.scheduleWithFixedDelay(new NoOpRunnable(),
335                                        MEDIUM_DELAY_MS, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
336              shouldThrow();
337 <        } catch(RejectedExecutionException success){
337 >        } catch (RejectedExecutionException success){
338          } catch (SecurityException ok) {
339          }
340          joinPool(se);
# Line 350 | Line 350 | public class ScheduledExecutorSubclassTe
350          p2.execute(new SmallRunnable());
351          try {
352              Thread.sleep(SHORT_DELAY_MS);
353 <        } catch(Exception e){
353 >        } catch (Exception e){
354              unexpectedException();
355          }
356          assertEquals(1, p2.getActiveCount());
# Line 367 | Line 367 | public class ScheduledExecutorSubclassTe
367          p2.execute(new SmallRunnable());
368          try {
369              Thread.sleep(MEDIUM_DELAY_MS);
370 <        } catch(Exception e){
370 >        } catch (Exception e){
371              unexpectedException();
372          }
373          assertEquals(1, p2.getCompletedTaskCount());
# Line 394 | Line 394 | public class ScheduledExecutorSubclassTe
394          p2.execute(new SmallRunnable());
395          try {
396              Thread.sleep(SHORT_DELAY_MS);
397 <        } catch(Exception e){
397 >        } catch (Exception e){
398              unexpectedException();
399          }
400          assertEquals(2, p2.getLargestPoolSize());
# Line 420 | Line 420 | public class ScheduledExecutorSubclassTe
420      public void testGetTaskCount() {
421          CustomExecutor p1 = new CustomExecutor(1);
422          assertEquals(0, p1.getTaskCount());
423 <        for(int i = 0; i < 5; i++)
423 >        for (int i = 0; i < 5; i++)
424              p1.execute(new SmallRunnable());
425          try {
426              Thread.sleep(SHORT_DELAY_MS);
427 <        } catch(Exception e){
427 >        } catch (Exception e){
428              unexpectedException();
429          }
430          assertEquals(5, p1.getTaskCount());
# Line 476 | Line 476 | public class ScheduledExecutorSubclassTe
476              assertFalse(p1.isShutdown());
477          }
478          finally {
479 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
479 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
480          }
481          assertTrue(p1.isShutdown());
482      }
# Line 490 | Line 490 | public class ScheduledExecutorSubclassTe
490          try {
491              p1.execute(new SmallRunnable());
492          } finally {
493 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
493 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
494          }
495          try {
496              assertTrue(p1.awaitTermination(LONG_DELAY_MS, TimeUnit.MILLISECONDS));
497              assertTrue(p1.isTerminated());
498 <        } catch(Exception e){
498 >        } catch (Exception e){
499              unexpectedException();
500          }
501      }
# Line 510 | Line 510 | public class ScheduledExecutorSubclassTe
510              p1.execute(new SmallRunnable());
511              assertFalse(p1.isTerminating());
512          } finally {
513 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
513 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
514          }
515          try {
516              assertTrue(p1.awaitTermination(LONG_DELAY_MS, TimeUnit.MILLISECONDS));
517              assertTrue(p1.isTerminated());
518              assertFalse(p1.isTerminating());
519 <        } catch(Exception e){
519 >        } catch (Exception e){
520              unexpectedException();
521          }
522      }
# Line 527 | Line 527 | public class ScheduledExecutorSubclassTe
527      public void testGetQueue() {
528          CustomExecutor p1 = new CustomExecutor(1);
529          ScheduledFuture[] tasks = new ScheduledFuture[5];
530 <        for(int i = 0; i < 5; i++){
530 >        for (int i = 0; i < 5; i++){
531              tasks[i] = p1.schedule(new SmallPossiblyInterruptedRunnable(), 1, TimeUnit.MILLISECONDS);
532          }
533          try {
# Line 535 | Line 535 | public class ScheduledExecutorSubclassTe
535              BlockingQueue<Runnable> q = p1.getQueue();
536              assertTrue(q.contains(tasks[4]));
537              assertFalse(q.contains(tasks[0]));
538 <        } catch(Exception e) {
538 >        } catch (Exception e) {
539              unexpectedException();
540          } finally {
541              joinPool(p1);
# Line 548 | Line 548 | public class ScheduledExecutorSubclassTe
548      public void testRemove() {
549          CustomExecutor p1 = new CustomExecutor(1);
550          ScheduledFuture[] tasks = new ScheduledFuture[5];
551 <        for(int i = 0; i < 5; i++){
551 >        for (int i = 0; i < 5; i++){
552              tasks[i] = p1.schedule(new SmallPossiblyInterruptedRunnable(), 1, TimeUnit.MILLISECONDS);
553          }
554          try {
# Line 563 | Line 563 | public class ScheduledExecutorSubclassTe
563              assertTrue(q.contains((Runnable)tasks[3]));
564              assertTrue(p1.remove((Runnable)tasks[3]));
565              assertFalse(q.contains((Runnable)tasks[3]));
566 <        } catch(Exception e) {
566 >        } catch (Exception e) {
567              unexpectedException();
568          } finally {
569              joinPool(p1);
# Line 576 | Line 576 | public class ScheduledExecutorSubclassTe
576      public void testPurge() {
577          CustomExecutor p1 = new CustomExecutor(1);
578          ScheduledFuture[] tasks = new ScheduledFuture[5];
579 <        for(int i = 0; i < 5; i++){
579 >        for (int i = 0; i < 5; i++){
580              tasks[i] = p1.schedule(new SmallPossiblyInterruptedRunnable(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
581          }
582          try {
# Line 594 | Line 594 | public class ScheduledExecutorSubclassTe
594                  Thread.sleep(1);
595              }
596              assertTrue(k < SMALL_DELAY_MS);
597 <        } catch(Exception e) {
597 >        } catch (Exception e) {
598              unexpectedException();
599          } finally {
600              joinPool(p1);
# Line 606 | Line 606 | public class ScheduledExecutorSubclassTe
606       */
607      public void testShutDownNow() {
608          CustomExecutor p1 = new CustomExecutor(1);
609 <        for(int i = 0; i < 5; i++)
609 >        for (int i = 0; i < 5; i++)
610              p1.schedule(new SmallPossiblyInterruptedRunnable(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
611          List l;
612          try {
# Line 630 | Line 630 | public class ScheduledExecutorSubclassTe
630              assertFalse(p1.getContinueExistingPeriodicTasksAfterShutdownPolicy());
631  
632              ScheduledFuture[] tasks = new ScheduledFuture[5];
633 <            for(int i = 0; i < 5; i++)
633 >            for (int i = 0; i < 5; i++)
634                  tasks[i] = p1.schedule(new NoOpRunnable(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
635 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
635 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
636              BlockingQueue q = p1.getQueue();
637              for (Iterator it = q.iterator(); it.hasNext();) {
638                  ScheduledFuture t = (ScheduledFuture)it.next();
# Line 646 | Line 646 | public class ScheduledExecutorSubclassTe
646              }
647  
648          }
649 <        catch(Exception ex) {
649 >        catch (Exception ex) {
650              unexpectedException();
651          }
652      }
# Line 661 | Line 661 | public class ScheduledExecutorSubclassTe
661              CustomExecutor p1 = new CustomExecutor(1);
662              p1.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
663              ScheduledFuture[] tasks = new ScheduledFuture[5];
664 <            for(int i = 0; i < 5; i++)
664 >            for (int i = 0; i < 5; i++)
665                  tasks[i] = p1.schedule(new NoOpRunnable(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
666 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
666 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
667              assertTrue(p1.isShutdown());
668              BlockingQueue q = p1.getQueue();
669              assertTrue(q.isEmpty());
670              Thread.sleep(SMALL_DELAY_MS);
671              assertTrue(p1.isTerminated());
672          }
673 <        catch(Exception ex) {
673 >        catch (Exception ex) {
674              unexpectedException();
675          }
676      }
# Line 686 | Line 686 | public class ScheduledExecutorSubclassTe
686              p1.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
687              ScheduledFuture task =
688                  p1.scheduleAtFixedRate(new NoOpRunnable(), 5, 5, TimeUnit.MILLISECONDS);
689 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
689 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
690              assertTrue(p1.isShutdown());
691              BlockingQueue q = p1.getQueue();
692              assertTrue(q.isEmpty());
693              Thread.sleep(SHORT_DELAY_MS);
694              assertTrue(p1.isTerminated());
695          }
696 <        catch(Exception ex) {
696 >        catch (Exception ex) {
697              unexpectedException();
698          }
699      }
# Line 709 | Line 709 | public class ScheduledExecutorSubclassTe
709              ScheduledFuture task =
710                  p1.scheduleAtFixedRate(new NoOpRunnable(), 1, 1, TimeUnit.MILLISECONDS);
711              assertFalse(task.isCancelled());
712 <            try { p1.shutdown(); } catch(SecurityException ok) { return; }
712 >            try { p1.shutdown(); } catch (SecurityException ok) { return; }
713              assertFalse(task.isCancelled());
714              assertFalse(p1.isTerminated());
715              assertTrue(p1.isShutdown());
# Line 720 | Line 720 | public class ScheduledExecutorSubclassTe
720              Thread.sleep(SHORT_DELAY_MS);
721              assertTrue(p1.isTerminated());
722          }
723 <        catch(Exception ex) {
723 >        catch (Exception ex) {
724              unexpectedException();
725          }
726          finally {
# Line 796 | Line 796 | public class ScheduledExecutorSubclassTe
796          try {
797              e.invokeAny(null);
798          } catch (NullPointerException success) {
799 <        } catch(Exception ex) {
799 >        } catch (Exception ex) {
800              unexpectedException();
801          } finally {
802              joinPool(e);
# Line 811 | Line 811 | public class ScheduledExecutorSubclassTe
811          try {
812              e.invokeAny(new ArrayList<Callable<String>>());
813          } catch (IllegalArgumentException success) {
814 <        } catch(Exception ex) {
814 >        } catch (Exception ex) {
815              unexpectedException();
816          } finally {
817              joinPool(e);
# Line 829 | Line 829 | public class ScheduledExecutorSubclassTe
829              l.add(null);
830              e.invokeAny(l);
831          } catch (NullPointerException success) {
832 <        } catch(Exception ex) {
832 >        } catch (Exception ex) {
833              unexpectedException();
834          } finally {
835              joinPool(e);
# Line 846 | Line 846 | public class ScheduledExecutorSubclassTe
846              l.add(new NPETask());
847              e.invokeAny(l);
848          } catch (ExecutionException success) {
849 <        } catch(Exception ex) {
849 >        } catch (Exception ex) {
850              unexpectedException();
851          } finally {
852              joinPool(e);
# Line 865 | Line 865 | public class ScheduledExecutorSubclassTe
865              String result = e.invokeAny(l);
866              assertSame(TEST_STRING, result);
867          } catch (ExecutionException success) {
868 <        } catch(Exception ex) {
868 >        } catch (Exception ex) {
869              unexpectedException();
870          } finally {
871              joinPool(e);
# Line 880 | Line 880 | public class ScheduledExecutorSubclassTe
880          try {
881              e.invokeAll(null);
882          } catch (NullPointerException success) {
883 <        } catch(Exception ex) {
883 >        } catch (Exception ex) {
884              unexpectedException();
885          } finally {
886              joinPool(e);
# Line 895 | Line 895 | public class ScheduledExecutorSubclassTe
895          try {
896              List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>());
897              assertTrue(r.isEmpty());
898 <        } catch(Exception ex) {
898 >        } catch (Exception ex) {
899              unexpectedException();
900          } finally {
901              joinPool(e);
# Line 913 | Line 913 | public class ScheduledExecutorSubclassTe
913              l.add(null);
914              e.invokeAll(l);
915          } catch (NullPointerException success) {
916 <        } catch(Exception ex) {
916 >        } catch (Exception ex) {
917              unexpectedException();
918          } finally {
919              joinPool(e);
# Line 932 | Line 932 | public class ScheduledExecutorSubclassTe
932              assertEquals(1, result.size());
933              for (Iterator<Future<String>> it = result.iterator(); it.hasNext();)
934                  it.next().get();
935 <        } catch(ExecutionException success) {
936 <        } catch(Exception ex) {
935 >        } catch (ExecutionException success) {
936 >        } catch (Exception ex) {
937              unexpectedException();
938          } finally {
939              joinPool(e);
# Line 954 | Line 954 | public class ScheduledExecutorSubclassTe
954              for (Iterator<Future<String>> it = result.iterator(); it.hasNext();)
955                  assertSame(TEST_STRING, it.next().get());
956          } catch (ExecutionException success) {
957 <        } catch(Exception ex) {
957 >        } catch (Exception ex) {
958              unexpectedException();
959          } finally {
960              joinPool(e);
# Line 969 | Line 969 | public class ScheduledExecutorSubclassTe
969          try {
970              e.invokeAny(null, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
971          } catch (NullPointerException success) {
972 <        } catch(Exception ex) {
972 >        } catch (Exception ex) {
973              unexpectedException();
974          } finally {
975              joinPool(e);
# Line 986 | Line 986 | public class ScheduledExecutorSubclassTe
986              l.add(new StringTask());
987              e.invokeAny(l, MEDIUM_DELAY_MS, null);
988          } catch (NullPointerException success) {
989 <        } catch(Exception ex) {
989 >        } catch (Exception ex) {
990              unexpectedException();
991          } finally {
992              joinPool(e);
# Line 1001 | Line 1001 | public class ScheduledExecutorSubclassTe
1001          try {
1002              e.invokeAny(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
1003          } catch (IllegalArgumentException success) {
1004 <        } catch(Exception ex) {
1004 >        } catch (Exception ex) {
1005              unexpectedException();
1006          } finally {
1007              joinPool(e);
# Line 1019 | Line 1019 | public class ScheduledExecutorSubclassTe
1019              l.add(null);
1020              e.invokeAny(l, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
1021          } catch (NullPointerException success) {
1022 <        } catch(Exception ex) {
1022 >        } catch (Exception ex) {
1023              ex.printStackTrace();
1024              unexpectedException();
1025          } finally {
# Line 1036 | Line 1036 | public class ScheduledExecutorSubclassTe
1036              ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
1037              l.add(new NPETask());
1038              e.invokeAny(l, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
1039 <        } catch(ExecutionException success) {
1040 <        } catch(Exception ex) {
1039 >        } catch (ExecutionException success) {
1040 >        } catch (Exception ex) {
1041              unexpectedException();
1042          } finally {
1043              joinPool(e);
# Line 1056 | Line 1056 | public class ScheduledExecutorSubclassTe
1056              String result = e.invokeAny(l, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
1057              assertSame(TEST_STRING, result);
1058          } catch (ExecutionException success) {
1059 <        } catch(Exception ex) {
1059 >        } catch (Exception ex) {
1060              unexpectedException();
1061          } finally {
1062              joinPool(e);
# Line 1071 | Line 1071 | public class ScheduledExecutorSubclassTe
1071          try {
1072              e.invokeAll(null, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
1073          } catch (NullPointerException success) {
1074 <        } catch(Exception ex) {
1074 >        } catch (Exception ex) {
1075              unexpectedException();
1076          } finally {
1077              joinPool(e);
# Line 1088 | Line 1088 | public class ScheduledExecutorSubclassTe
1088              l.add(new StringTask());
1089              e.invokeAll(l, MEDIUM_DELAY_MS, null);
1090          } catch (NullPointerException success) {
1091 <        } catch(Exception ex) {
1091 >        } catch (Exception ex) {
1092              unexpectedException();
1093          } finally {
1094              joinPool(e);
# Line 1103 | Line 1103 | public class ScheduledExecutorSubclassTe
1103          try {
1104              List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
1105              assertTrue(r.isEmpty());
1106 <        } catch(Exception ex) {
1106 >        } catch (Exception ex) {
1107              unexpectedException();
1108          } finally {
1109              joinPool(e);
# Line 1121 | Line 1121 | public class ScheduledExecutorSubclassTe
1121              l.add(null);
1122              e.invokeAll(l, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
1123          } catch (NullPointerException success) {
1124 <        } catch(Exception ex) {
1124 >        } catch (Exception ex) {
1125              unexpectedException();
1126          } finally {
1127              joinPool(e);
# Line 1140 | Line 1140 | public class ScheduledExecutorSubclassTe
1140              assertEquals(1, result.size());
1141              for (Iterator<Future<String>> it = result.iterator(); it.hasNext();)
1142                  it.next().get();
1143 <        } catch(ExecutionException success) {
1144 <        } catch(Exception ex) {
1143 >        } catch (ExecutionException success) {
1144 >        } catch (Exception ex) {
1145              unexpectedException();
1146          } finally {
1147              joinPool(e);
# Line 1162 | Line 1162 | public class ScheduledExecutorSubclassTe
1162              for (Iterator<Future<String>> it = result.iterator(); it.hasNext();)
1163                  assertSame(TEST_STRING, it.next().get());
1164          } catch (ExecutionException success) {
1165 <        } catch(Exception ex) {
1165 >        } catch (Exception ex) {
1166              unexpectedException();
1167          } finally {
1168              joinPool(e);
# Line 1190 | Line 1190 | public class ScheduledExecutorSubclassTe
1190              assertTrue(f3.isDone());
1191              assertFalse(f1.isCancelled());
1192              assertTrue(f2.isCancelled());
1193 <        } catch(Exception ex) {
1193 >        } catch (Exception ex) {
1194              unexpectedException();
1195          } finally {
1196              joinPool(e);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines