rt/emul/mini/src/main/java/java/lang/Object.java
changeset 1285 456e2909bd5a
parent 1260 fe3567c7b522
child 1458 5c8caf0ba8b8
child 1483 cecf27be3802
     1.1 --- a/rt/emul/mini/src/main/java/java/lang/Object.java	Sat Sep 07 13:56:22 2013 +0200
     1.2 +++ b/rt/emul/mini/src/main/java/java/lang/Object.java	Tue Sep 17 14:25:30 2013 +0200
     1.3 @@ -328,7 +328,8 @@
     1.4       * @see        java.lang.Object#notifyAll()
     1.5       * @see        java.lang.Object#wait()
     1.6       */
     1.7 -    public final native void notify();
     1.8 +    public final void notify() {
     1.9 +    }
    1.10  
    1.11      /**
    1.12       * Wakes up all threads that are waiting on this object's monitor. A
    1.13 @@ -352,7 +353,8 @@
    1.14       * @see        java.lang.Object#notify()
    1.15       * @see        java.lang.Object#wait()
    1.16       */
    1.17 -    public final native void notifyAll();
    1.18 +    public final void notifyAll() {
    1.19 +    }
    1.20  
    1.21      /**
    1.22       * Causes the current thread to wait until either another thread invokes the
    1.23 @@ -439,7 +441,9 @@
    1.24       * @see        java.lang.Object#notify()
    1.25       * @see        java.lang.Object#notifyAll()
    1.26       */
    1.27 -    public final native void wait(long timeout) throws InterruptedException;
    1.28 +    public final void wait(long timeout) throws InterruptedException {
    1.29 +        throw new InterruptedException();
    1.30 +    }
    1.31  
    1.32      /**
    1.33       * Causes the current thread to wait until another thread invokes the
    1.34 @@ -504,20 +508,7 @@
    1.35       *             this exception is thrown.
    1.36       */
    1.37      public final void wait(long timeout, int nanos) throws InterruptedException {
    1.38 -        if (timeout < 0) {
    1.39 -            throw new IllegalArgumentException("timeout value is negative");
    1.40 -        }
    1.41 -
    1.42 -        if (nanos < 0 || nanos > 999999) {
    1.43 -            throw new IllegalArgumentException(
    1.44 -                                "nanosecond timeout value out of range");
    1.45 -        }
    1.46 -
    1.47 -        if (nanos >= 500000 || (nanos != 0 && timeout == 0)) {
    1.48 -            timeout++;
    1.49 -        }
    1.50 -
    1.51 -        wait(timeout);
    1.52 +        throw new InterruptedException();
    1.53      }
    1.54  
    1.55      /**
    1.56 @@ -559,7 +550,7 @@
    1.57       * @see        java.lang.Object#notifyAll()
    1.58       */
    1.59      public final void wait() throws InterruptedException {
    1.60 -        wait(0);
    1.61 +        throw new InterruptedException();
    1.62      }
    1.63  
    1.64      /**