Thread.java (setDaemon): Check startable_flag, not isAlive().
* java/lang/Thread.java (setDaemon): Check startable_flag, not isAlive(). From-SVN: r57906
This commit is contained in:
parent
fcce224d2a
commit
8086481ce6
2 changed files with 6 additions and 1 deletions
|
@ -137,7 +137,7 @@ public class Thread implements Runnable
|
|||
public final void setDaemon (boolean status)
|
||||
{
|
||||
checkAccess ();
|
||||
if (isAlive ())
|
||||
if (!startable_flag)
|
||||
throw new IllegalThreadStateException ();
|
||||
daemon_flag = status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue