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

Comparing jsr166/src/test/tck/ForkJoinPool8Test.java (file contents):
Revision 1.8 by jsr166, Mon Jun 3 16:46:12 2013 UTC vs.
Revision 1.9 by jsr166, Mon Jun 3 18:20:05 2013 UTC

# Line 185 | Line 185 | public class ForkJoinPool8Test extends J
185          final int number;
186          int result;
187          FibAction(int n) { number = n; }
188 <        public void realCompute() {
188 >        protected void realCompute() {
189              int n = number;
190              if (n <= 1)
191                  result = n;
# Line 223 | Line 223 | public class ForkJoinPool8Test extends J
223       */
224      public void testInvoke() {
225          RecursiveAction a = new CheckedRecursiveAction() {
226 <            public void realCompute() {
226 >            protected void realCompute() {
227                  FibAction f = new FibAction(8);
228                  assertNull(f.invoke());
229                  assertEquals(21, f.result);
# Line 239 | Line 239 | public class ForkJoinPool8Test extends J
239       */
240      public void testQuietlyInvoke() {
241          RecursiveAction a = new CheckedRecursiveAction() {
242 <            public void realCompute() {
242 >            protected void realCompute() {
243                  FibAction f = new FibAction(8);
244                  f.quietlyInvoke();
245                  assertEquals(21, f.result);
# Line 253 | Line 253 | public class ForkJoinPool8Test extends J
253       */
254      public void testForkJoin() {
255          RecursiveAction a = new CheckedRecursiveAction() {
256 <            public void realCompute() {
256 >            protected void realCompute() {
257                  FibAction f = new FibAction(8);
258                  assertSame(f, f.fork());
259                  assertNull(f.join());
# Line 268 | Line 268 | public class ForkJoinPool8Test extends J
268       */
269      public void testJoinIgnoresInterrupts() {
270          RecursiveAction a = new CheckedRecursiveAction() {
271 <            public void realCompute() {
271 >            protected void realCompute() {
272                  FibAction f = new FibAction(8);
273                  final Thread myself = Thread.currentThread();
274  
# Line 346 | Line 346 | public class ForkJoinPool8Test extends J
346       */
347      public void testForkGet() {
348          RecursiveAction a = new CheckedRecursiveAction() {
349 <            public void realCompute() throws Exception {
349 >            protected void realCompute() throws Exception {
350                  FibAction f = new FibAction(8);
351                  assertSame(f, f.fork());
352                  assertNull(f.get());
# Line 361 | Line 361 | public class ForkJoinPool8Test extends J
361       */
362      public void testForkTimedGet() {
363          RecursiveAction a = new CheckedRecursiveAction() {
364 <            public void realCompute() throws Exception {
364 >            protected void realCompute() throws Exception {
365                  FibAction f = new FibAction(8);
366                  assertSame(f, f.fork());
367                  assertNull(f.get(5L, SECONDS));
# Line 376 | Line 376 | public class ForkJoinPool8Test extends J
376       */
377      public void testForkTimedGetNPE() {
378          RecursiveAction a = new CheckedRecursiveAction() {
379 <            public void realCompute() throws Exception {
379 >            protected void realCompute() throws Exception {
380                  FibAction f = new FibAction(8);
381                  assertSame(f, f.fork());
382                  try {
# Line 392 | Line 392 | public class ForkJoinPool8Test extends J
392       */
393      public void testForkQuietlyJoin() {
394          RecursiveAction a = new CheckedRecursiveAction() {
395 <            public void realCompute() {
395 >            protected void realCompute() {
396                  FibAction f = new FibAction(8);
397                  assertSame(f, f.fork());
398                  f.quietlyJoin();
# Line 407 | Line 407 | public class ForkJoinPool8Test extends J
407       */
408      public void testAbnormalInvoke() {
409          RecursiveAction a = new CheckedRecursiveAction() {
410 <            public void realCompute() {
410 >            protected void realCompute() {
411                  FailingFibAction f = new FailingFibAction(8);
412                  try {
413                      f.invoke();
# Line 424 | Line 424 | public class ForkJoinPool8Test extends J
424       */
425      public void testAbnormalQuietlyInvoke() {
426          RecursiveAction a = new CheckedRecursiveAction() {
427 <            public void realCompute() {
427 >            protected void realCompute() {
428                  FailingFibAction f = new FailingFibAction(8);
429                  f.quietlyInvoke();
430                  assertTrue(f.getException() instanceof FJException);
# Line 438 | Line 438 | public class ForkJoinPool8Test extends J
438       */
439      public void testAbnormalForkJoin() {
440          RecursiveAction a = new CheckedRecursiveAction() {
441 <            public void realCompute() {
441 >            protected void realCompute() {
442                  FailingFibAction f = new FailingFibAction(8);
443                  assertSame(f, f.fork());
444                  try {
# Line 456 | Line 456 | public class ForkJoinPool8Test extends J
456       */
457      public void testAbnormalForkGet() {
458          RecursiveAction a = new CheckedRecursiveAction() {
459 <            public void realCompute() throws Exception {
459 >            protected void realCompute() throws Exception {
460                  FailingFibAction f = new FailingFibAction(8);
461                  assertSame(f, f.fork());
462                  try {
# Line 476 | Line 476 | public class ForkJoinPool8Test extends J
476       */
477      public void testAbnormalForkTimedGet() {
478          RecursiveAction a = new CheckedRecursiveAction() {
479 <            public void realCompute() throws Exception {
479 >            protected void realCompute() throws Exception {
480                  FailingFibAction f = new FailingFibAction(8);
481                  assertSame(f, f.fork());
482                  try {
# Line 496 | Line 496 | public class ForkJoinPool8Test extends J
496       */
497      public void testAbnormalForkQuietlyJoin() {
498          RecursiveAction a = new CheckedRecursiveAction() {
499 <            public void realCompute() {
499 >            protected void realCompute() {
500                  FailingFibAction f = new FailingFibAction(8);
501                  assertSame(f, f.fork());
502                  f.quietlyJoin();
# Line 511 | Line 511 | public class ForkJoinPool8Test extends J
511       */
512      public void testCancelledInvoke() {
513          RecursiveAction a = new CheckedRecursiveAction() {
514 <            public void realCompute() {
514 >            protected void realCompute() {
515                  FibAction f = new FibAction(8);
516                  assertTrue(f.cancel(true));
517                  try {
# Line 529 | Line 529 | public class ForkJoinPool8Test extends J
529       */
530      public void testCancelledForkJoin() {
531          RecursiveAction a = new CheckedRecursiveAction() {
532 <            public void realCompute() {
532 >            protected void realCompute() {
533                  FibAction f = new FibAction(8);
534                  assertTrue(f.cancel(true));
535                  assertSame(f, f.fork());
# Line 548 | Line 548 | public class ForkJoinPool8Test extends J
548       */
549      public void testCancelledForkGet() {
550          RecursiveAction a = new CheckedRecursiveAction() {
551 <            public void realCompute() throws Exception {
551 >            protected void realCompute() throws Exception {
552                  FibAction f = new FibAction(8);
553                  assertTrue(f.cancel(true));
554                  assertSame(f, f.fork());
# Line 567 | Line 567 | public class ForkJoinPool8Test extends J
567       */
568      public void testCancelledForkTimedGet() {
569          RecursiveAction a = new CheckedRecursiveAction() {
570 <            public void realCompute() throws Exception {
570 >            protected void realCompute() throws Exception {
571                  FibAction f = new FibAction(8);
572                  assertTrue(f.cancel(true));
573                  assertSame(f, f.fork());
# Line 586 | Line 586 | public class ForkJoinPool8Test extends J
586       */
587      public void testCancelledForkQuietlyJoin() {
588          RecursiveAction a = new CheckedRecursiveAction() {
589 <            public void realCompute() {
589 >            protected void realCompute() {
590                  FibAction f = new FibAction(8);
591                  assertTrue(f.cancel(true));
592                  assertSame(f, f.fork());
# Line 601 | Line 601 | public class ForkJoinPool8Test extends J
601       */
602      public void testInForkJoinPool2() {
603          RecursiveAction a = new CheckedRecursiveAction() {
604 <            public void realCompute() {
604 >            protected void realCompute() {
605                  assertFalse(inForkJoinPool());
606              }};
607          assertNull(a.invoke());
# Line 612 | Line 612 | public class ForkJoinPool8Test extends J
612       */
613      public void testReinitialize() {
614          RecursiveAction a = new CheckedRecursiveAction() {
615 <            public void realCompute() {
615 >            protected void realCompute() {
616                  FibAction f = new FibAction(8);
617                  checkNotDone(f);
618  
# Line 632 | Line 632 | public class ForkJoinPool8Test extends J
632       */
633      public void testReinitializeAbnormal() {
634          RecursiveAction a = new CheckedRecursiveAction() {
635 <            public void realCompute() {
635 >            protected void realCompute() {
636                  FailingFibAction f = new FailingFibAction(8);
637                  checkNotDone(f);
638  
# Line 655 | Line 655 | public class ForkJoinPool8Test extends J
655       */
656      public void testCompleteExceptionally() {
657          RecursiveAction a = new CheckedRecursiveAction() {
658 <            public void realCompute() {
658 >            protected void realCompute() {
659                  FibAction f = new FibAction(8);
660                  f.completeExceptionally(new FJException());
661                  try {
# Line 673 | Line 673 | public class ForkJoinPool8Test extends J
673       */
674      public void testComplete() {
675          RecursiveAction a = new CheckedRecursiveAction() {
676 <            public void realCompute() {
676 >            protected void realCompute() {
677                  FibAction f = new FibAction(8);
678                  f.complete(null);
679                  assertNull(f.invoke());
# Line 688 | Line 688 | public class ForkJoinPool8Test extends J
688       */
689      public void testInvokeAll2() {
690          RecursiveAction a = new CheckedRecursiveAction() {
691 <            public void realCompute() {
691 >            protected void realCompute() {
692                  FibAction f = new FibAction(8);
693                  FibAction g = new FibAction(9);
694                  invokeAll(f, g);
# Line 705 | Line 705 | public class ForkJoinPool8Test extends J
705       */
706      public void testInvokeAll1() {
707          RecursiveAction a = new CheckedRecursiveAction() {
708 <            public void realCompute() {
708 >            protected void realCompute() {
709                  FibAction f = new FibAction(8);
710                  invokeAll(f);
711                  checkCompletedNormally(f);
# Line 719 | Line 719 | public class ForkJoinPool8Test extends J
719       */
720      public void testInvokeAll3() {
721          RecursiveAction a = new CheckedRecursiveAction() {
722 <            public void realCompute() {
722 >            protected void realCompute() {
723                  FibAction f = new FibAction(8);
724                  FibAction g = new FibAction(9);
725                  FibAction h = new FibAction(7);
# Line 742 | Line 742 | public class ForkJoinPool8Test extends J
742       */
743      public void testInvokeAllCollection() {
744          RecursiveAction a = new CheckedRecursiveAction() {
745 <            public void realCompute() {
745 >            protected void realCompute() {
746                  FibAction f = new FibAction(8);
747                  FibAction g = new FibAction(9);
748                  FibAction h = new FibAction(7);
# Line 769 | Line 769 | public class ForkJoinPool8Test extends J
769       */
770      public void testInvokeAllNPE() {
771          RecursiveAction a = new CheckedRecursiveAction() {
772 <            public void realCompute() {
772 >            protected void realCompute() {
773                  FibAction f = new FibAction(8);
774                  FibAction g = new FibAction(9);
775                  FibAction h = null;
# Line 786 | Line 786 | public class ForkJoinPool8Test extends J
786       */
787      public void testAbnormalInvokeAll2() {
788          RecursiveAction a = new CheckedRecursiveAction() {
789 <            public void realCompute() {
789 >            protected void realCompute() {
790                  FibAction f = new FibAction(8);
791                  FailingFibAction g = new FailingFibAction(9);
792                  try {
# Line 804 | Line 804 | public class ForkJoinPool8Test extends J
804       */
805      public void testAbnormalInvokeAll1() {
806          RecursiveAction a = new CheckedRecursiveAction() {
807 <            public void realCompute() {
807 >            protected void realCompute() {
808                  FailingFibAction g = new FailingFibAction(9);
809                  try {
810                      invokeAll(g);
# Line 821 | Line 821 | public class ForkJoinPool8Test extends J
821       */
822      public void testAbnormalInvokeAll3() {
823          RecursiveAction a = new CheckedRecursiveAction() {
824 <            public void realCompute() {
824 >            protected void realCompute() {
825                  FibAction f = new FibAction(8);
826                  FailingFibAction g = new FailingFibAction(9);
827                  FibAction h = new FibAction(7);
# Line 840 | Line 840 | public class ForkJoinPool8Test extends J
840       */
841      public void testAbnormalInvokeAllCollection() {
842          RecursiveAction a = new CheckedRecursiveAction() {
843 <            public void realCompute() {
843 >            protected void realCompute() {
844                  FailingFibAction f = new FailingFibAction(8);
845                  FibAction g = new FibAction(9);
846                  FibAction h = new FibAction(7);
# Line 860 | Line 860 | public class ForkJoinPool8Test extends J
860  
861      // CountedCompleter versions
862  
863    public abstract class CheckedFJTask extends RecursiveAction {
864        protected abstract void realCompute() throws Throwable;
865
866        public final void compute() {
867            try {
868                realCompute();
869            } catch (Throwable t) {
870                threadUnexpectedException(t);
871            }
872        }
873    }
874
863      abstract static class CCF extends CountedCompleter {
864          int number;
865          int rnumber;
# Line 980 | Line 968 | public class ForkJoinPool8Test extends J
968       * completed tasks; getRawResult returns null.
969       */
970      public void testInvokeCC() {
971 <        ForkJoinTask a = new CheckedFJTask() {
972 <            public void realCompute() {
971 >        ForkJoinTask a = new CheckedRecursiveAction() {
972 >            protected void realCompute() {
973                  CCF f = new LCCF(null, 8);
974                  assertNull(f.invoke());
975                  assertEquals(21, f.number);
# Line 996 | Line 984 | public class ForkJoinPool8Test extends J
984       * completed tasks
985       */
986      public void testQuietlyInvokeCC() {
987 <        ForkJoinTask a = new CheckedFJTask() {
988 <            public void realCompute() {
987 >        ForkJoinTask a = new CheckedRecursiveAction() {
988 >            protected void realCompute() {
989                  CCF f = new LCCF(null, 8);
990                  f.quietlyInvoke();
991                  assertEquals(21, f.number);
# Line 1010 | Line 998 | public class ForkJoinPool8Test extends J
998       * join of a forked task returns when task completes
999       */
1000      public void testForkJoinCC() {
1001 <        ForkJoinTask a = new CheckedFJTask() {
1002 <            public void realCompute() {
1001 >        ForkJoinTask a = new CheckedRecursiveAction() {
1002 >            protected void realCompute() {
1003                  CCF f = new LCCF(null, 8);
1004                  assertSame(f, f.fork());
1005                  assertNull(f.join());
# Line 1025 | Line 1013 | public class ForkJoinPool8Test extends J
1013       * get of a forked task returns when task completes
1014       */
1015      public void testForkGetCC() {
1016 <        ForkJoinTask a = new CheckedFJTask() {
1017 <            public void realCompute() throws Exception {
1016 >        ForkJoinTask a = new CheckedRecursiveAction() {
1017 >            protected void realCompute() throws Exception {
1018                  CCF f = new LCCF(null, 8);
1019                  assertSame(f, f.fork());
1020                  assertNull(f.get());
# Line 1040 | Line 1028 | public class ForkJoinPool8Test extends J
1028       * timed get of a forked task returns when task completes
1029       */
1030      public void testForkTimedGetCC() {
1031 <        ForkJoinTask a = new CheckedFJTask() {
1032 <            public void realCompute() throws Exception {
1031 >        ForkJoinTask a = new CheckedRecursiveAction() {
1032 >            protected void realCompute() throws Exception {
1033                  CCF f = new LCCF(null, 8);
1034                  assertSame(f, f.fork());
1035                  assertNull(f.get(LONG_DELAY_MS, MILLISECONDS));
# Line 1055 | Line 1043 | public class ForkJoinPool8Test extends J
1043       * timed get with null time unit throws NPE
1044       */
1045      public void testForkTimedGetNPECC() {
1046 <        ForkJoinTask a = new CheckedFJTask() {
1047 <            public void realCompute() throws Exception {
1046 >        ForkJoinTask a = new CheckedRecursiveAction() {
1047 >            protected void realCompute() throws Exception {
1048                  CCF f = new LCCF(null, 8);
1049                  assertSame(f, f.fork());
1050                  try {
# Line 1071 | Line 1059 | public class ForkJoinPool8Test extends J
1059       * quietlyJoin of a forked task returns when task completes
1060       */
1061      public void testForkQuietlyJoinCC() {
1062 <        ForkJoinTask a = new CheckedFJTask() {
1063 <            public void realCompute() {
1062 >        ForkJoinTask a = new CheckedRecursiveAction() {
1063 >            protected void realCompute() {
1064                  CCF f = new LCCF(null, 8);
1065                  assertSame(f, f.fork());
1066                  f.quietlyJoin();
# Line 1086 | Line 1074 | public class ForkJoinPool8Test extends J
1074       * invoke task throws exception when task completes abnormally
1075       */
1076      public void testAbnormalInvokeCC() {
1077 <        ForkJoinTask a = new CheckedFJTask() {
1078 <            public void realCompute() {
1077 >        ForkJoinTask a = new CheckedRecursiveAction() {
1078 >            protected void realCompute() {
1079                  FailingCCF f = new LFCCF(null, 8);
1080                  try {
1081                      f.invoke();
# Line 1103 | Line 1091 | public class ForkJoinPool8Test extends J
1091       * quietlyInvoke task returns when task completes abnormally
1092       */
1093      public void testAbnormalQuietlyInvokeCC() {
1094 <        ForkJoinTask a = new CheckedFJTask() {
1095 <            public void realCompute() {
1094 >        ForkJoinTask a = new CheckedRecursiveAction() {
1095 >            protected void realCompute() {
1096                  FailingCCF f = new LFCCF(null, 8);
1097                  f.quietlyInvoke();
1098                  assertTrue(f.getException() instanceof FJException);
# Line 1117 | Line 1105 | public class ForkJoinPool8Test extends J
1105       * join of a forked task throws exception when task completes abnormally
1106       */
1107      public void testAbnormalForkJoinCC() {
1108 <        ForkJoinTask a = new CheckedFJTask() {
1109 <            public void realCompute() {
1108 >        ForkJoinTask a = new CheckedRecursiveAction() {
1109 >            protected void realCompute() {
1110                  FailingCCF f = new LFCCF(null, 8);
1111                  assertSame(f, f.fork());
1112                  try {
# Line 1135 | Line 1123 | public class ForkJoinPool8Test extends J
1123       * get of a forked task throws exception when task completes abnormally
1124       */
1125      public void testAbnormalForkGetCC() {
1126 <        ForkJoinTask a = new CheckedFJTask() {
1127 <            public void realCompute() throws Exception {
1126 >        ForkJoinTask a = new CheckedRecursiveAction() {
1127 >            protected void realCompute() throws Exception {
1128                  FailingCCF f = new LFCCF(null, 8);
1129                  assertSame(f, f.fork());
1130                  try {
# Line 1155 | Line 1143 | public class ForkJoinPool8Test extends J
1143       * timed get of a forked task throws exception when task completes abnormally
1144       */
1145      public void testAbnormalForkTimedGetCC() {
1146 <        ForkJoinTask a = new CheckedFJTask() {
1147 <            public void realCompute() throws Exception {
1146 >        ForkJoinTask a = new CheckedRecursiveAction() {
1147 >            protected void realCompute() throws Exception {
1148                  FailingCCF f = new LFCCF(null, 8);
1149                  assertSame(f, f.fork());
1150                  try {
# Line 1175 | Line 1163 | public class ForkJoinPool8Test extends J
1163       * quietlyJoin of a forked task returns when task completes abnormally
1164       */
1165      public void testAbnormalForkQuietlyJoinCC() {
1166 <        ForkJoinTask a = new CheckedFJTask() {
1167 <            public void realCompute() {
1166 >        ForkJoinTask a = new CheckedRecursiveAction() {
1167 >            protected void realCompute() {
1168                  FailingCCF f = new LFCCF(null, 8);
1169                  assertSame(f, f.fork());
1170                  f.quietlyJoin();
# Line 1190 | Line 1178 | public class ForkJoinPool8Test extends J
1178       * invoke task throws exception when task cancelled
1179       */
1180      public void testCancelledInvokeCC() {
1181 <        ForkJoinTask a = new CheckedFJTask() {
1182 <            public void realCompute() {
1181 >        ForkJoinTask a = new CheckedRecursiveAction() {
1182 >            protected void realCompute() {
1183                  CCF f = new LCCF(null, 8);
1184                  assertTrue(f.cancel(true));
1185                  try {
# Line 1208 | Line 1196 | public class ForkJoinPool8Test extends J
1196       * join of a forked task throws exception when task cancelled
1197       */
1198      public void testCancelledForkJoinCC() {
1199 <        ForkJoinTask a = new CheckedFJTask() {
1200 <            public void realCompute() {
1199 >        ForkJoinTask a = new CheckedRecursiveAction() {
1200 >            protected void realCompute() {
1201                  CCF f = new LCCF(null, 8);
1202                  assertTrue(f.cancel(true));
1203                  assertSame(f, f.fork());
# Line 1227 | Line 1215 | public class ForkJoinPool8Test extends J
1215       * get of a forked task throws exception when task cancelled
1216       */
1217      public void testCancelledForkGetCC() {
1218 <        ForkJoinTask a = new CheckedFJTask() {
1219 <            public void realCompute() throws Exception {
1218 >        ForkJoinTask a = new CheckedRecursiveAction() {
1219 >            protected void realCompute() throws Exception {
1220                  CCF f = new LCCF(null, 8);
1221                  assertTrue(f.cancel(true));
1222                  assertSame(f, f.fork());
# Line 1246 | Line 1234 | public class ForkJoinPool8Test extends J
1234       * timed get of a forked task throws exception when task cancelled
1235       */
1236      public void testCancelledForkTimedGetCC() throws Exception {
1237 <        ForkJoinTask a = new CheckedFJTask() {
1238 <            public void realCompute() throws Exception {
1237 >        ForkJoinTask a = new CheckedRecursiveAction() {
1238 >            protected void realCompute() throws Exception {
1239                  CCF f = new LCCF(null, 8);
1240                  assertTrue(f.cancel(true));
1241                  assertSame(f, f.fork());
# Line 1265 | Line 1253 | public class ForkJoinPool8Test extends J
1253       * quietlyJoin of a forked task returns when task cancelled
1254       */
1255      public void testCancelledForkQuietlyJoinCC() {
1256 <        ForkJoinTask a = new CheckedFJTask() {
1257 <            public void realCompute() {
1256 >        ForkJoinTask a = new CheckedRecursiveAction() {
1257 >            protected void realCompute() {
1258                  CCF f = new LCCF(null, 8);
1259                  assertTrue(f.cancel(true));
1260                  assertSame(f, f.fork());
# Line 1280 | Line 1268 | public class ForkJoinPool8Test extends J
1268       * getPool of non-FJ task returns null
1269       */
1270      public void testGetPool2CC() {
1271 <        ForkJoinTask a = new CheckedFJTask() {
1272 <            public void realCompute() {
1271 >        ForkJoinTask a = new CheckedRecursiveAction() {
1272 >            protected void realCompute() {
1273                  assertNull(getPool());
1274              }};
1275          assertNull(a.invoke());
# Line 1291 | Line 1279 | public class ForkJoinPool8Test extends J
1279       * inForkJoinPool of non-FJ task returns false
1280       */
1281      public void testInForkJoinPool2CC() {
1282 <        ForkJoinTask a = new CheckedFJTask() {
1283 <            public void realCompute() {
1282 >        ForkJoinTask a = new CheckedRecursiveAction() {
1283 >            protected void realCompute() {
1284                  assertFalse(inForkJoinPool());
1285              }};
1286          assertNull(a.invoke());
# Line 1302 | Line 1290 | public class ForkJoinPool8Test extends J
1290       * setRawResult(null) succeeds
1291       */
1292      public void testSetRawResultCC() {
1293 <        ForkJoinTask a = new CheckedFJTask() {
1294 <            public void realCompute() {
1293 >        ForkJoinTask a = new CheckedRecursiveAction() {
1294 >            protected void realCompute() {
1295                  setRawResult(null);
1296                  assertNull(getRawResult());
1297              }};
# Line 1314 | Line 1302 | public class ForkJoinPool8Test extends J
1302       * invoke task throws exception after invoking completeExceptionally
1303       */
1304      public void testCompleteExceptionally2CC() {
1305 <        ForkJoinTask a = new CheckedFJTask() {
1306 <            public void realCompute() {
1305 >        ForkJoinTask a = new CheckedRecursiveAction() {
1306 >            protected void realCompute() {
1307                  CCF f = new LCCF(null, 8);
1308                  f.completeExceptionally(new FJException());
1309                  try {
# Line 1332 | Line 1320 | public class ForkJoinPool8Test extends J
1320       * invokeAll(t1, t2) invokes all task arguments
1321       */
1322      public void testInvokeAll2CC() {
1323 <        ForkJoinTask a = new CheckedFJTask() {
1324 <            public void realCompute() {
1323 >        ForkJoinTask a = new CheckedRecursiveAction() {
1324 >            protected void realCompute() {
1325                  CCF f = new LCCF(null, 8);
1326                  CCF g = new LCCF(null, 9);
1327                  invokeAll(f, g);
# Line 1349 | Line 1337 | public class ForkJoinPool8Test extends J
1337       * invokeAll(tasks) with 1 argument invokes task
1338       */
1339      public void testInvokeAll1CC() {
1340 <        ForkJoinTask a = new CheckedFJTask() {
1341 <            public void realCompute() {
1340 >        ForkJoinTask a = new CheckedRecursiveAction() {
1341 >            protected void realCompute() {
1342                  CCF f = new LCCF(null, 8);
1343                  invokeAll(f);
1344                  checkCompletedNormally(f);
# Line 1363 | Line 1351 | public class ForkJoinPool8Test extends J
1351       * invokeAll(tasks) with > 2 argument invokes tasks
1352       */
1353      public void testInvokeAll3CC() {
1354 <        ForkJoinTask a = new CheckedFJTask() {
1355 <            public void realCompute() {
1354 >        ForkJoinTask a = new CheckedRecursiveAction() {
1355 >            protected void realCompute() {
1356                  CCF f = new LCCF(null, 8);
1357                  CCF g = new LCCF(null, 9);
1358                  CCF h = new LCCF(null, 7);
# Line 1383 | Line 1371 | public class ForkJoinPool8Test extends J
1371       * invokeAll(collection) invokes all tasks in the collection
1372       */
1373      public void testInvokeAllCollectionCC() {
1374 <        ForkJoinTask a = new CheckedFJTask() {
1375 <            public void realCompute() {
1374 >        ForkJoinTask a = new CheckedRecursiveAction() {
1375 >            protected void realCompute() {
1376                  CCF f = new LCCF(null, 8);
1377                  CCF g = new LCCF(null, 9);
1378                  CCF h = new LCCF(null, 7);
# Line 1407 | Line 1395 | public class ForkJoinPool8Test extends J
1395       * invokeAll(tasks) with any null task throws NPE
1396       */
1397      public void testInvokeAllNPECC() {
1398 <        ForkJoinTask a = new CheckedFJTask() {
1399 <            public void realCompute() {
1398 >        ForkJoinTask a = new CheckedRecursiveAction() {
1399 >            protected void realCompute() {
1400                  CCF f = new LCCF(null, 8);
1401                  CCF g = new LCCF(null, 9);
1402                  CCF h = null;
# Line 1424 | Line 1412 | public class ForkJoinPool8Test extends J
1412       * invokeAll(t1, t2) throw exception if any task does
1413       */
1414      public void testAbnormalInvokeAll2CC() {
1415 <        ForkJoinTask a = new CheckedFJTask() {
1416 <            public void realCompute() {
1415 >        ForkJoinTask a = new CheckedRecursiveAction() {
1416 >            protected void realCompute() {
1417                  CCF f = new LCCF(null, 8);
1418                  FailingCCF g = new LFCCF(null, 9);
1419                  try {
# Line 1442 | Line 1430 | public class ForkJoinPool8Test extends J
1430       * invokeAll(tasks) with 1 argument throws exception if task does
1431       */
1432      public void testAbnormalInvokeAll1CC() {
1433 <        ForkJoinTask a = new CheckedFJTask() {
1434 <            public void realCompute() {
1433 >        ForkJoinTask a = new CheckedRecursiveAction() {
1434 >            protected void realCompute() {
1435                  FailingCCF g = new LFCCF(null, 9);
1436                  try {
1437                      invokeAll(g);
# Line 1459 | Line 1447 | public class ForkJoinPool8Test extends J
1447       * invokeAll(tasks) with > 2 argument throws exception if any task does
1448       */
1449      public void testAbnormalInvokeAll3CC() {
1450 <        ForkJoinTask a = new CheckedFJTask() {
1451 <            public void realCompute() {
1450 >        ForkJoinTask a = new CheckedRecursiveAction() {
1451 >            protected void realCompute() {
1452                  CCF f = new LCCF(null, 8);
1453                  FailingCCF g = new LFCCF(null, 9);
1454                  CCF h = new LCCF(null, 7);
# Line 1478 | Line 1466 | public class ForkJoinPool8Test extends J
1466       * invokeAll(collection)  throws exception if any task does
1467       */
1468      public void testAbnormalInvokeAllCollectionCC() {
1469 <        ForkJoinTask a = new CheckedFJTask() {
1470 <            public void realCompute() {
1469 >        ForkJoinTask a = new CheckedRecursiveAction() {
1470 >            protected void realCompute() {
1471                  FailingCCF f = new LFCCF(null, 8);
1472                  CCF g = new LCCF(null, 9);
1473                  CCF h = new LCCF(null, 7);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines