8157528: jdk/jshell/ExecutionControlTest.java failed intermittently with NPE
authorrfield
Mon, 23 May 2016 13:05:04 -0700
changeset 38540 0668586535f1
parent 38539 71874886920f
child 38541 44e95493fd13
8157528: jdk/jshell/ExecutionControlTest.java failed intermittently with NPE Reviewed-by: jlahoda
langtools/test/jdk/jshell/LocalExecutionControl.java
--- a/langtools/test/jdk/jshell/LocalExecutionControl.java	Mon May 23 10:12:05 2016 -0700
+++ b/langtools/test/jdk/jshell/LocalExecutionControl.java	Mon May 23 13:05:04 2016 -0700
@@ -171,7 +171,8 @@
                 Thread[] threadList = new Thread[execThreadGroup.activeCount()];
                 execThreadGroup.enumerate(threadList);
                 for (Thread thread : threadList) {
-                    thread.join();
+                    if (thread != null)
+                        thread.join();
                 }
 
                 if (stopped.get()) {