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

Mistake in documentation of ArrayList#removeRange

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 7
    • core-libs

    Description

      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.

      Attachments

        Activity

          People

            igerasim Ivan Gerasimov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: