changeset 2913:9fa1f8b38b6f

6974093: Thread.clone should NOT invoke addUnstarted on started threads Reviewed-by: dholmes, coffeys
author chegar
date Wed, 11 Aug 2010 09:32:38 +0100
parents e857e8316bf1
children f5ed38dc8d36
files src/share/classes/java/lang/Thread.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/lang/Thread.java	Thu Jul 22 17:26:33 2010 +0100
+++ b/src/share/classes/java/lang/Thread.java	Wed Aug 11 09:32:38 2010 +0100
@@ -441,7 +441,9 @@
             t.threadLocals = null;
 
             group.checkAccess();
-            group.addUnstarted();
+            if (threadStatus == 0) {
+                group.addUnstarted();
+            }
             t.setPriority(priority);
 
             final Thread current = Thread.currentThread();