11 |
|
public class RecursiveActionTest extends JSR166TestCase { |
12 |
|
|
13 |
|
public static void main(String[] args) { |
14 |
< |
junit.textui.TestRunner.run (suite()); |
14 |
> |
junit.textui.TestRunner.run (suite()); |
15 |
|
} |
16 |
|
public static Test suite() { |
17 |
< |
return new TestSuite(RecursiveActionTest.class); |
17 |
> |
return new TestSuite(RecursiveActionTest.class); |
18 |
|
} |
19 |
|
|
20 |
|
static final ForkJoinPool mainPool = new ForkJoinPool(); |
162 |
|
*/ |
163 |
|
public void testForkTimedGetNPE() { |
164 |
|
RecursiveAction a = new RecursiveAction() { |
165 |
< |
public void compute() { |
166 |
< |
try { |
167 |
< |
FibAction f = new FibAction(8); |
168 |
< |
f.fork(); |
169 |
< |
f.get(5L, null); |
170 |
< |
shouldThrow(); |
171 |
< |
} catch (NullPointerException success) { |
172 |
< |
} catch (Exception ex) { |
173 |
< |
unexpectedException(ex); |
174 |
< |
} |
165 |
> |
public void compute() { |
166 |
> |
try { |
167 |
> |
FibAction f = new FibAction(8); |
168 |
> |
f.fork(); |
169 |
> |
f.get(5L, null); |
170 |
> |
shouldThrow(); |
171 |
> |
} catch (NullPointerException success) { |
172 |
> |
} catch (Exception ex) { |
173 |
> |
unexpectedException(ex); |
174 |
|
} |
175 |
< |
}; |
175 |
> |
}}; |
176 |
|
mainPool.invoke(a); |
177 |
|
} |
178 |
|
|