Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5076007

Javadoc for methods before() and after() in class java.util.Date incomplete

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs



      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)
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: