< prev index next >

test/hotspot/jtreg/compiler/dependencies/MonomorphicObjectCall/java.base/java/lang/Object.java

Print this page

        

@@ -60,11 +60,15 @@
     public final native void notify();
 
     @HotSpotIntrinsicCandidate
     public final native void notifyAll();
 
-    public final native void wait(long timeout) throws InterruptedException;
+    private final native void wait0(long timeout) throws InterruptedException;
+
+    public final void wait(long timeout) throws InterruptedException {
+        wait0(timeout);
+    }
 
     public final void wait(long timeout, int nanos) throws InterruptedException {
         if (timeout < 0) {
             throw new IllegalArgumentException("timeout value is negative");
         }

@@ -76,15 +80,15 @@
 
         if (nanos >= 500000 || (nanos != 0 && timeout == 0)) {
             timeout++;
         }
 
-        wait(timeout);
+        wait0(timeout);
     }
 
     public final void wait() throws InterruptedException {
-        wait(0);
+        wait0(0);
     }
 
     /**
      * Replaces original finalize() method and is therefore not
      * overridden by any subclasses of Object.
< prev index next >