diff --git a/libjava/ChangeLog b/libjava/ChangeLog index f3ab9636bda1..04307791bdee 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2003-08-07 Bryce McKinlay + + * 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 * java/io/FilePermission.java (equals): Use correct index for diff --git a/libjava/java/lang/Thread.java b/libjava/java/lang/Thread.java index 32f7d174580f..64498b23ba43 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); - - // 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) { + // The Class Libraries book says ``threadName cannot be null''. I + // take this to mean NullPointerException. + if (n == null) + throw new NullPointerException (); + if (g == null) { // If CURRENT is null, then we are bootstrapping the first thread.