diff options
Diffstat (limited to 'libjava/classpath/java/lang/Thread.java')
-rw-r--r-- | libjava/classpath/java/lang/Thread.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libjava/classpath/java/lang/Thread.java b/libjava/classpath/java/lang/Thread.java index 37ca630b4ed..763228c16ef 100644 --- a/libjava/classpath/java/lang/Thread.java +++ b/libjava/classpath/java/lang/Thread.java @@ -38,6 +38,7 @@ exception statement from your version. */ package java.lang; +import java.security.Permission; import java.util.Map; import java.util.WeakHashMap; @@ -704,7 +705,7 @@ public class Thread implements Runnable * * @return the context class loader * @throws SecurityException when permission is denied - * @see setContextClassLoader(ClassLoader) + * @see #setContextClassLoader(ClassLoader) * @since 1.2 */ public synchronized ClassLoader getContextClassLoader() @@ -726,7 +727,7 @@ public class Thread implements Runnable * * @param classloader the new context class loader * @throws SecurityException when permission is denied - * @see getContextClassLoader() + * @see #getContextClassLoader() * @since 1.2 */ public synchronized void setContextClassLoader(ClassLoader classloader) @@ -812,8 +813,11 @@ public class Thread implements Runnable { // Check parameters - if (ms < 0 || ns < 0 || ns > 999999) - throw new IllegalArgumentException(); + if (ms < 0 ) + throw new IllegalArgumentException("Negative milliseconds: " + ms); + + if (ns < 0 || ns > 999999) + throw new IllegalArgumentException("Nanoseconds ouf of range: " + ns); // Really sleep VMThread.sleep(ms, ns); |