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.7 by jsr166, Sat Feb 9 19:20:54 2019 UTC vs.
Revision 1.10 by dl, Tue Mar 22 21:29:24 2022 UTC

# Line 11 | Line 11 | import java.util.concurrent.CountDownLat
11   import java.util.concurrent.ForkJoinPool;
12   import java.util.concurrent.ForkJoinTask;
13   import java.util.concurrent.Future;
14 import java.util.concurrent.ThreadLocalRandom;
14   import java.util.stream.Stream;
15  
16   import junit.framework.Test;
# Line 29 | Line 28 | public class ForkJoinPool9Test extends J
28      /**
29       * Check handling of common pool thread context class loader
30       */
31 +    @SuppressWarnings("removal")
32      public void testCommonPoolThreadContextClassLoader() throws Throwable {
33          if (!testImplementationDetails) return;
34  
# Line 54 | Line 54 | public class ForkJoinPool9Test extends J
54              Thread currentThread = Thread.currentThread();
55  
56              Stream.of(systemClassLoader, null).forEach(cl -> {
57 <                if (ThreadLocalRandom.current().nextBoolean())
57 >                if (randomBoolean())
58                      // should always be permitted, without effect
59                      currentThread.setContextClassLoader(cl);
60                  });

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines