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

EOU: Incomplete description of java.sql.Data.valueOf method in API documentation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.2
    • 1.4.1
    • docs
    • b14
    • generic
    • generic



      Name: rmT116609 Date: 07/17/2002


      FULL PRODUCT VERSION :
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode

      DESCRIPTION OF THE PROBLEM :
      In the documentation of the J2SE API, Version 1.4 (and 1.3.1) the method java.sql.Date.valueOf is described incompletely.

      It isn't mentioned that it throws an IllegalArgumentException if the given String doesn't conform to the JDBC escape sequence.

      This is misleading because in java.sql.Timestamp the same method reacts in the same way, but in the documentation of that method this behaviour is descibed.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :

      http://java.sun.com/j2se/1.4.1/docs/api/java/sql/Date.html#valueOf(java.lang.String)

      Please also see:

      http://java.sun.com/j2se/1.4.1/docs/api/java/sql/Timestamp.html#valueOf(java.lang.String)


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      The java.sql.Date.valueOf description should contain the description(similar to the text found at java.sql.Timestamp.valueOf):

      Throws: IllegalArgumentException - if the given argument does not have the format yyyy-mm-dd (similar to the text found at java.sql.Timestamp.valueOf):

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

            mfishersunw Maydene Fisher (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: