changeset 3430:dec94c8de74e

8157528: jdk/jshell/ExecutionControlTest.java failed intermittently with NPE Reviewed-by: jlahoda
author rfield
date Mon, 23 May 2016 13:05:04 -0700
parents d44729b76ebc
children 0f81cdd51b42
files test/jdk/jshell/LocalExecutionControl.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/jshell/LocalExecutionControl.java	Mon May 23 10:12:05 2016 -0700
+++ b/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()) {