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
This commit is contained in:
Bryce McKinlay 2003-08-07 01:12:27 +00:00 committed by Bryce McKinlay
parent 2f62bfe46c
commit 6eac0ef54e
2 changed files with 11 additions and 10 deletions

View file

@ -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.