JDK-4712520 : (spec thread) Thread.sleep(long) missing "@throws IllegalArgumentException"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.3.1,1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-07-10
  • Updated: 2007-04-23
  • Resolved: 2007-04-23
Related Reports
Duplicate :  
Description
Thread.sleep(long ms ) throws a IllegalArgumentException when you pass a
negative value .

This is not documented in the javadoc for Thread.sleep(long ms ) while
it is specified for Thread.sleep(long ms, int nanosec )

Thread.sleep(long) should declare that it throws an
IllegalArgumentException the same way that Thread.sleep(long, int) does.

Comments
EVALUATION The reporter is correct. ###@###.### 2002-07-24
24-07-2002