6974093: Thread.clone should NOT invoke addUnstarted on started threads

Reviewed-by: dholmes, coffeys
This commit is contained in:
Chris Hegarty 2010-08-11 09:32:38 +01:00
parent 3dde10558a
commit 3072a8ef28

View File

@ -441,7 +441,9 @@ class Thread implements Runnable {
t.threadLocals = null;
group.checkAccess();
group.addUnstarted();
if (threadStatus == 0) {
group.addUnstarted();
}
t.setPriority(priority);
final Thread current = Thread.currentThread();