Skip to content

Commit 3708af7

Browse files
hansonrhansonr
authored andcommitted
setting Thread.sleep() to generate a message and throw a new
InterruptedException
1 parent 2bf6c9d commit 3708af7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sources/net.sf.j2s.java.core/src/java/lang/Thread.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public static void yield() {
320320
*/
321321
public static void sleep(long millis) throws InterruptedException {
322322
JSUtil.notImplemented(null);
323-
JSUtil.warn("SwingJS does not implement Thread.sleep(long)");
323+
throw new InterruptedException("SwingJS does not implement Thread.sleep(long)");
324324
}
325325
/**
326326
* Causes the currently executing thread to sleep (cease execution)
@@ -354,7 +354,7 @@ public static void sleep(long millis, int nanos)
354354
millis++;
355355
}
356356
JSUtil.notImplemented(null);
357-
JSUtil.warn("SwingJS does not implement Thread.sleep(long,int)");
357+
throw new InterruptedException("SwingJS does not implement Thread.sleep(long,int)");
358358
// sleep(millis);
359359
}
360360

0 commit comments

Comments
 (0)