minor fix to Object.java

Archie Cobbs archie at whistle.com
Fri Jul 31 12:41:20 PDT 1998


Seeing as wait(0, 0) is very different from wait(0, 1)...

Index: libraries/javalib/java/lang/Object.java
===================================================================
RCS file: /cvs/mod/net/kaffe/libraries/javalib/java/lang/Object.java,v
retrieving revision 1.1.1.1
diff -c -u -r1.1.1.1 Object.java
--- Object.java	1998/07/14 16:49:31	1.1.1.1
+++ Object.java	1998/07/31 19:40:40
@@ -33,7 +33,9 @@
   }
   
   public final void wait(long timeout, int nanos) throws InterruptedException {
-    /* nanos? assume they are 0 and just wait for now */
+    /* Ignore nanos, except avoid clipping a non-zero quantity to zero */
+    if (timeout == 0 && nanos > 0)
+	timeout++;
     wait(timeout);    
   }
   

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


More information about the kaffe mailing list