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

(str) incorrect wording in doc for String.subSequence

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 8
    • 8
    • core-libs
    • b47
    • generic
    • generic
    • Verified

      This one has been there for a few years.

      http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#subSequence(int,
      int)

      Problem: The throws comment refers to a parameter that doesn't
      exist: startIndex should be endIndex.

      Bad:

      Throws: IndexOutOfBoundsException - if beginIndex or endIndex are
      negative, if endIndex is greater than length(), or if beginIndex is
      greater than startIndex

      Good:

      Throws: IndexOutOfBoundsException - if beginIndex or endIndex are
      negative, if endIndex is greater than length(), or if beginIndex is
      greater than endIndex

            smarks Stuart Marks
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: