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
|
@ -1,3 +1,8 @@
|
||||||
|
2002-10-06 Mark Wielaard <mark@klomp.org>
|
||||||
|
|
||||||
|
* java/lang/Thread.java (setDaemon): Check startable_flag,
|
||||||
|
not isAlive().
|
||||||
|
|
||||||
2002-10-07 Michael Koch <konqueror@gmx.de>
|
2002-10-07 Michael Koch <konqueror@gmx.de>
|
||||||
|
|
||||||
* java/nio/Buffer.java: New stub file.
|
* java/nio/Buffer.java: New stub file.
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class Thread implements Runnable
|
||||||
public final void setDaemon (boolean status)
|
public final void setDaemon (boolean status)
|
||||||
{
|
{
|
||||||
checkAccess ();
|
checkAccess ();
|
||||||
if (isAlive ())
|
if (!startable_flag)
|
||||||
throw new IllegalThreadStateException ();
|
throw new IllegalThreadStateException ();
|
||||||
daemon_flag = status;
|
daemon_flag = status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue