wrong javadoc for java.lang.StringBuffer.[last]indexOf(String, *)

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: docs
    • beta
    • sparc
    • solaris_2.5



      Name: akR10050 Date: 07/17/2000



      The javadoc specification for the following methods:
      public int indexOf(String)
      public int indexOf(String, int)
      public int lastIndexOf(String)
      public int lastIndexOf(String, int)

      refer to this.startsWith(String, *), which does not exist in the
      java.lang.StringBuffer class. Though it is clear what the specification means,
      javadoc comments should be corrected to be precise and avoid confusion.

      Here is the sample javadoc excerpt from indexOf(String) specification:

      ...
      The integer returned is the smallest value k such that:

                      this.startsWith(str, k)
                           ^^^^^^^^^^ there is no such method in StringBuffer
      ...

      ======================================================================

            Assignee:
            Michael Mccloskey (Inactive)
            Reporter:
            Kai Kai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: