diff options
| author | Mark Wielaard <mark@gcc.gnu.org> | 2005-11-15 23:20:01 +0000 |
|---|---|---|
| committer | Mark Wielaard <mark@gcc.gnu.org> | 2005-11-15 23:20:01 +0000 |
| commit | 8f523f3a1047919d3563daf1ef47ba87336ebe89 (patch) | |
| tree | a5eb7cf42a51869cc8aa1fad7ad6a90cca47fdd8 /libjava/classpath/java/lang/Thread.java | |
| parent | 02e549bfaaec38f68307e7f34e46ea57ea1809af (diff) | |
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
From-SVN: r107049
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); |
