Mistake in documentation of ArrayList#removeRange

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 7
    • Component/s: core-libs

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      Link to documentation:
      http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html#removeRange(int,%20int)

      According to the documentation, an IndexOutOfBoundsException is thrown if (fromIndex < 0 || fromIndex >= size() || toIndex > size() || toIndex < fromIndex).

      However, no Exception is thrown on removeRange(size(), size()). Removing the condition (fromIndex >= size()) from the documentation should fix the mistake.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            Assignee:
            Ivan Gerasimov
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: