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

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.127 by dl, Tue Jan 26 13:33:06 2021 UTC vs.
Revision 1.128 by jsr166, Wed Jan 27 01:57:24 2021 UTC

# Line 567 | Line 567 | public class ThreadPoolExecutorTest exte
567              @SuppressWarnings("unchecked")
568              FutureTask<Boolean>[] tasks = (FutureTask<Boolean>[])rtasks;
569              for (int i = 0; i < tasks.length; i++) {
570 <                Callable<Boolean> task = new CheckedCallable<Boolean>() {
570 >                Callable<Boolean> task = new CheckedCallable<>() {
571                      public Boolean realCall() throws InterruptedException {
572                          threadStarted.countDown();
573                          assertSame(q, p.getQueue());
574                          await(done);
575                          return Boolean.TRUE;
576                      }};
577 <                tasks[i] = new FutureTask<Boolean>(task);
577 >                tasks[i] = new FutureTask<>(task);
578                  p.execute(tasks[i]);
579              }
580              await(threadStarted);
# Line 635 | Line 635 | public class ThreadPoolExecutorTest exte
635              @SuppressWarnings("unchecked")
636              FutureTask<Boolean>[] tasks = (FutureTask<Boolean>[])rtasks;
637              for (int i = 0; i < tasks.length; i++) {
638 <                Callable<Boolean> task = new CheckedCallable<Boolean>() {
638 >                Callable<Boolean> task = new CheckedCallable<>() {
639                      public Boolean realCall() throws InterruptedException {
640                          threadStarted.countDown();
641                          await(done);
642                          return Boolean.TRUE;
643                      }};
644 <                tasks[i] = new FutureTask<Boolean>(task);
644 >                tasks[i] = new FutureTask<>(task);
645                  p.execute(tasks[i]);
646              }
647              await(threadStarted);
# Line 1054 | Line 1054 | public class ThreadPoolExecutorTest exte
1054              final CountDownLatch threadStarted = new CountDownLatch(1);
1055              Thread t = newStartedThread(new CheckedInterruptedRunnable() {
1056                  public void realRun() throws Exception {
1057 <                    Callable<Boolean> task = new CheckedCallable<Boolean>() {
1057 >                    Callable<Boolean> task = new CheckedCallable<>() {
1058                          public Boolean realCall() throws InterruptedException {
1059                              threadStarted.countDown();
1060                              await(done);
# Line 1774 | Line 1774 | public class ThreadPoolExecutorTest exte
1774      public void testTimedInvokeAll6() throws Exception {
1775          for (long timeout = timeoutMillis();;) {
1776              final CountDownLatch done = new CountDownLatch(1);
1777 <            final Callable<String> waiter = new CheckedCallable<String>() {
1777 >            final Callable<String> waiter = new CheckedCallable<>() {
1778                  public String realCall() {
1779                      try { done.await(LONG_DELAY_MS, MILLISECONDS); }
1780                      catch (InterruptedException ok) {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines