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

Please document that Date.compareTo could throw nullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.4.0
    • core-libs



      Name: jk109818 Date: 01/24/2002


      FULL PRODUCT VERSION :
      this involves documentation

      A DESCRIPTION OF THE PROBLEM :
      javadocs clearly states that compareTo method in
       java.lang.String throws a nullPointerException should the
       argument be null.

      Unfortunately this is not documented in the java.util.Date
       class javadocs. At the very least the documentations
       between the two classes must be consistent.

      It also helps developers by clearly reminding them that
       they should not pass in a null and saves them debugging
        time later.


      This bug can be reproduced always.
      (Review ID: 138695)
      ======================================================================

            okutsu Masayoshi Okutsu
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: