changeset 440:a049121b193b

6974093: Thread.clone should NOT invoke addUnstarted on started threads Reviewed-by: dholmes, coffeys
author chegar
date Wed, 11 Aug 2010 09:34:00 +0100
parents 9dcb9df28fc1
children cc18d89db2f8
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	Mon Aug 09 09:49:41 2010 -0700
+++ b/src/share/classes/java/lang/Thread.java	Wed Aug 11 09:34:00 2010 +0100
@@ -409,7 +409,9 @@
             t.threadLocals = null;
 
             group.checkAccess();
-            group.addUnstarted();
+            if (threadStatus == 0) {
+                group.addUnstarted();
+            }
             t.setPriority(priority);
 
             final Thread current = Thread.currentThread();