36 |
|
|
37 |
|
public class ThreadPoolExecutorSubclassTest extends JSR166TestCase { |
38 |
|
public static void main(String[] args) { |
39 |
< |
junit.textui.TestRunner.run(suite()); |
39 |
> |
main(suite(), args); |
40 |
|
} |
41 |
|
public static Test suite() { |
42 |
|
return new TestSuite(ThreadPoolExecutorSubclassTest.class); |
58 |
|
CustomTask(final Runnable r, final V res) { |
59 |
|
if (r == null) throw new NullPointerException(); |
60 |
|
callable = new Callable<V>() { |
61 |
< |
public V call() throws Exception { r.run(); return res; }}; |
61 |
> |
public V call() throws Exception { r.run(); return res; }}; |
62 |
|
} |
63 |
|
public boolean isDone() { |
64 |
|
lock.lock(); try { return done; } finally { lock.unlock() ; } |