diff options
author | Bryce McKinlay <bryce@mckinlay.net.nz> | 2003-08-07 01:12:27 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2003-08-07 02:12:27 +0100 |
commit | 6eac0ef54eba75e34876c600199e30d290747b13 (patch) | |
tree | 1c5031ee634a4c7f86373e5212aa17fb3cb62f86 | |
parent | 2f62bfe46c02830eb419f18afa67e4b4659584e5 (diff) | |
download | gcc-6eac0ef54eba75e34876c600199e30d290747b13.zip gcc-6eac0ef54eba75e34876c600199e30d290747b13.tar.gz gcc-6eac0ef54eba75e34876c600199e30d290747b13.tar.bz2 |
Thread.java (Thread): Check for null "name" from start of private constructor...
* java/lang/Thread.java (Thread): Check for null "name" from
start of private constructor, not after calling the private
constructor.
From-SVN: r70216
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/java/lang/Thread.java | 13 |
2 files changed, 10 insertions, 9 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index f3ab963..0430779 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2003-08-07 Bryce McKinlay <bryce@mckinlay.net.nz> + + * java/lang/Thread.java (Thread): Check for null "name" from + start of private constructor, not after calling the private + constructor. + 2003-08-06 Tom Tromey <tromey@redhat.com> * java/io/FilePermission.java (equals): Use correct index for diff --git a/libjava/java/lang/Thread.java b/libjava/java/lang/Thread.java index 32f7d17..64498b2 100644 --- a/libjava/java/lang/Thread.java +++ b/libjava/java/lang/Thread.java @@ -614,11 +614,6 @@ public class Thread implements Runnable public Thread (ThreadGroup g, Runnable r, String n) { this (currentThread (), g, r, n); - - // The Class Libraries book says ``threadName cannot be null''. I - // take this to mean NullPointerException. - if (n == null) - throw new NullPointerException (); } /** @@ -645,15 +640,15 @@ public class Thread implements Runnable { // Just ignore stackSize for now. this (currentThread (), g, r, n); + } + private Thread (Thread current, ThreadGroup g, Runnable r, String n) + { // The Class Libraries book says ``threadName cannot be null''. I // take this to mean NullPointerException. if (n == null) throw new NullPointerException (); - } - - private Thread (Thread current, ThreadGroup g, Runnable r, String n) - { + if (g == null) { // If CURRENT is null, then we are bootstrapping the first thread. |