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

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.193 by jsr166, Mon May 23 18:19:48 2016 UTC vs.
Revision 1.195 by jsr166, Sat Jun 4 23:49:29 2016 UTC

# Line 12 | Line 12
12   * @modules java.management
13   * @build *
14   * @run junit/othervm/timeout=1000 -Djsr166.testImplementationDetails=true JSR166TestCase
15 + * @run junit/othervm/timeout=1000 -Djava.util.concurrent.ForkJoinPool.common.parallelism=0 -Djsr166.testImplementationDetails=true JSR166TestCase
16   */
17  
18   import static java.util.concurrent.TimeUnit.MILLISECONDS;
# Line 978 | Line 979 | public class JSR166TestCase extends Test
979       * Uninteresting threads are filtered out.
980       */
981      static void dumpTestThreads() {
982 +        SecurityManager sm = System.getSecurityManager();
983 +        if (sm != null) {
984 +            try {
985 +                System.setSecurityManager(null);
986 +            } catch (SecurityException giveUp) {
987 +                return;
988 +            }
989 +        }
990 +
991          ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
992          System.err.println("------ stacktrace dump start ------");
993          for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) {
# Line 995 | Line 1005 | public class JSR166TestCase extends Test
1005              System.err.print(info);
1006          }
1007          System.err.println("------ stacktrace dump end ------");
1008 +
1009 +        if (sm != null) System.setSecurityManager(sm);
1010      }
1011  
1012      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines