diff options
author | Mark Wielaard <mark@klomp.org> | 2002-10-07 21:02:38 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2002-10-07 21:02:38 +0000 |
commit | 8086481ce6cecd9d2a3b2cf4c30533d246c7166d (patch) | |
tree | dbf33cd76d1a7ed960a99575abd9fffcbe8cfabf /libjava | |
parent | fcce224d2a322481095f1b3ecf259b7acae50b6b (diff) | |
download | gcc-8086481ce6cecd9d2a3b2cf4c30533d246c7166d.zip gcc-8086481ce6cecd9d2a3b2cf4c30533d246c7166d.tar.gz gcc-8086481ce6cecd9d2a3b2cf4c30533d246c7166d.tar.bz2 |
Thread.java (setDaemon): Check startable_flag, not isAlive().
* java/lang/Thread.java (setDaemon): Check startable_flag,
not isAlive().
From-SVN: r57906
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/Thread.java | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index b7effb1..defc525 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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. diff --git a/libjava/java/lang/Thread.java b/libjava/java/lang/Thread.java index 64d58dd..18af829 100644 --- a/libjava/java/lang/Thread.java +++ b/libjava/java/lang/Thread.java @@ -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; } |