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

javadoc API compareTo() methods sort order not specified

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.2
    • tools



      Name: jl125535 Date: 06/28/2004


      URL OF PROBLEM DOCUMENTATION :
      http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/doclet/com/sun/javadoc/SerialFieldTag.html#compareTo(java.lang.Object)

      http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/doclet/com/sun/javadoc/Doc.html#compareTo(java.lang.Object)

      A DESCRIPTION OF THE PROBLEM :
      In the Javadoc API, the compareTo methods don't specify their sort order.

      For example, in .../guide/javadoc/doclet/com/sun/javadoc/SerialFieldTag.html,
      the method description for compareTo(...) says:

        Compares this Object with the specified Object for order. Returns a
        negative integer, zero, or a positive integer as this Object is less than,
        equal to, or greater than the given Object.

      That is the contract for Comparable.compareTo(...).

      What is the definition of less than/etc. for a com.sun.javadoc.SerialFieldTag?

      The documentation does say:

        Included to make SerialFieldTag items java.lang.Comparable.

      Is it trying to say that the sort order isn't defined? If so, it should just
      say so clearly.


      The documentation for com.sun.javadoc.Doc says just about the same
      thing.
      (Incident Review ID: 281786)
      ======================================================================

            Unassigned Unassigned
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: