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

correction of Timestamp.compareTo(Date o) javadoc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • P3
    • 6u4
    • 6
    • core-libs
    • x86
    • windows_xp

    Description

      The current implementation of Timestamp.compareTo(java.util.Date) in
      jdk 6.0 and jdk 5.0 latest update release never throw
      ClassCastException. But the relevant javadoc description will bring
      confusion to end users. With BugID 6567409's evaluation, the current
      behavior is correct and the comments regarding the ClassCastException
      throwing should be removed. Please refer to bug 6567409.

      http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Timestamp.html#compareTo(java.util.Date)

      http://java.sun.com/javase/6/docs/api/java/sql/Timestamp.html#compareTo(java.util.Date)

      The sentence below should be deleted.

      ---
      If the argument is not a Timestamp object, this method throws a ClassCastException object.
      ---

      And in 5.0's javadoc, "Throws: ClassCastException - if the argument is
      not a Timestamp object" should also be removed.

      Attachments

        Activity

          People

            lancea Lance Andersen
            xiaojuzh Xiaojun Zhang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: