(str) incorrect wording in doc for String.subSequence

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 8
    • Affects Version/s: 8
    • Component/s: 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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: