From 6eac0ef54eba75e34876c600199e30d290747b13 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Thu, 7 Aug 2003 01:12:27 +0000 Subject: 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 --- libjava/java/lang/Thread.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'libjava/java/lang/Thread.java') 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. -- cgit v1.1