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

Comparing jsr166/src/test/tck/ForkJoinPool9Test.java (file contents):
Revision 1.5 by jsr166, Sat Apr 1 14:24:10 2017 UTC vs.
Revision 1.6 by jsr166, Fri Dec 14 02:48:21 2018 UTC

# Line 41 | Line 41 | public class ForkJoinPool9Test extends J
41          ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
42          boolean haveSecurityManager = (System.getSecurityManager() != null);
43          CountDownLatch taskStarted = new CountDownLatch(1);
44 +        ClassLoader classLoaderDistinctFromSystemClassLoader
45 +            = ClassLoader.getPlatformClassLoader();
46 +        assertNotSame(classLoaderDistinctFromSystemClassLoader,
47 +                      systemClassLoader);
48          Runnable runInCommonPool = () -> {
49              taskStarted.countDown();
50              assertTrue(ForkJoinTask.inForkJoinPool());
# Line 54 | Line 58 | public class ForkJoinPool9Test extends J
58                  assertThrows(
59                      SecurityException.class,
60                      () -> System.getProperty("foo"),
61 <                    () -> Thread.currentThread().setContextClassLoader(null));
61 >                    () -> Thread.currentThread().setContextClassLoader(
62 >                        classLoaderDistinctFromSystemClassLoader));
63              // TODO ?
64   //          if (haveSecurityManager
65   //              && Thread.currentThread().getClass().getSimpleName()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines