--- jsr166/src/test/tck/JSR166TestCase.java 2016/05/23 18:42:17 1.194 +++ jsr166/src/test/tck/JSR166TestCase.java 2016/06/04 23:49:29 1.195 @@ -979,6 +979,15 @@ public class JSR166TestCase extends Test * Uninteresting threads are filtered out. */ static void dumpTestThreads() { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + try { + System.setSecurityManager(null); + } catch (SecurityException giveUp) { + return; + } + } + ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); System.err.println("------ stacktrace dump start ------"); for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) { @@ -996,6 +1005,8 @@ public class JSR166TestCase extends Test System.err.print(info); } System.err.println("------ stacktrace dump end ------"); + + if (sm != null) System.setSecurityManager(sm); } /**