JDK-5076007 : Javadoc for methods before() and after() in class java.util.Date incomplete
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-07-20
  • Updated: 2004-07-20
  • Resolved: 2004-07-20
Related Reports
Duplicate :  
Description

Name: rmT116609			Date: 07/20/2004


A DESCRIPTION OF THE PROBLEM :
The javadoc for methods before() and after() in class java.util.Date does not indicate, that the methods' parameters may not be null.

The methods throw a NullPointerException when null is passed as the "when" parameter.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The methods should either be proof to null parameters or the documentation should tell that the parameters may not be null and a NullPointerException is thrown otherwise.
ACTUAL -
Look at the documentation URL.

URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html#after(java.util.Date)
(Incident Review ID: 286507) 
======================================================================

Comments
EVALUATION Name: nl37777 Date: 07/20/2004 The NullPointerException was documented as part of the changes for 4614842. ======================================================================
21-07-2004