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:
Mark Wielaard 2002-10-07 21:02:38 +00:00 committed by Mark Wielaard
parent fcce224d2a
commit 8086481ce6
2 changed files with 6 additions and 1 deletions

View File

@ -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>
* java/nio/Buffer.java: New stub file.

View File

@ -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;
}