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

Comparing jsr166/src/test/tck/AbstractExecutorServiceTest.java (file contents):
Revision 1.48 by jsr166, Mon Jul 17 22:27:30 2017 UTC vs.
Revision 1.49 by dl, Tue Jan 26 13:33:05 2021 UTC

# Line 47 | Line 47 | public class AbstractExecutorServiceTest
47          public void shutdown() { shutdown = true; }
48          public List<Runnable> shutdownNow() {
49              shutdown = true;
50 <            return Collections.EMPTY_LIST;
50 >            return Collections.emptyList();
51          }
52          public boolean isShutdown() { return shutdown; }
53          public boolean isTerminated() { return isShutdown(); }
# Line 111 | Line 111 | public class AbstractExecutorServiceTest
111          Runnable r = new CheckedRunnable() {
112              public void realRun() throws Exception {
113                  ExecutorService e = new DirectExecutorService();
114 <                Future future = e.submit(Executors.callable(new PrivilegedAction() {
114 >                Future<?> future = e.submit(Executors.callable(new PrivilegedAction<Object>() {
115                      public Object run() {
116                          return TEST_STRING;
117                      }}));
# Line 132 | Line 132 | public class AbstractExecutorServiceTest
132          Runnable r = new CheckedRunnable() {
133              public void realRun() throws Exception {
134                  ExecutorService e = new DirectExecutorService();
135 <                Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() {
135 >                Future<?> future = e.submit(Executors.callable(new PrivilegedExceptionAction<Object>() {
136                      public Object run() {
137                          return TEST_STRING;
138                      }}));
# Line 150 | Line 150 | public class AbstractExecutorServiceTest
150          Runnable r = new CheckedRunnable() {
151              public void realRun() throws Exception {
152                  ExecutorService e = new DirectExecutorService();
153 <                Future future = e.submit(Executors.callable(new PrivilegedExceptionAction() {
153 >                Future<?> future = e.submit(Executors.callable(new PrivilegedExceptionAction<Object>() {
154                      public Object run() throws Exception {
155                          throw new IndexOutOfBoundsException();
156                      }}));
# Line 213 | Line 213 | public class AbstractExecutorServiceTest
213                                     60, TimeUnit.SECONDS,
214                                     new ArrayBlockingQueue<Runnable>(10));
215          try (PoolCleaner cleaner = cleaner(p)) {
216 <            Callable c = new Callable() {
216 >            Callable<Object> c = new Callable<Object>() {
217                  public Object call() { throw new ArithmeticException(); }};
218              try {
219                  p.submit(c).get();
# Line 584 | Line 584 | public class AbstractExecutorServiceTest
584                      e.invokeAll(tasks, timeout, MILLISECONDS);
585                  assertEquals(tasks.size(), futures.size());
586                  assertTrue(millisElapsedSince(startTime) >= timeout);
587 <                for (Future future : futures)
587 >                for (Future<?> future : futures)
588                      assertTrue(future.isDone());
589                  try {
590                      assertEquals("0", futures.get(0).get());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines