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

no-arg ArrayList constructor specification has confusing wording about capacity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 8
    • core-libs

      FULL PRODUCT VERSION :
      Not related to runtime

      ADDITIONAL OS VERSION INFORMATION :
      Not related to OS

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Not related to configuration

      A DESCRIPTION OF THE PROBLEM :
      The java.util.ArrayList constructor without parameters has the following description:

      Constructs an empty list with an initial capacity of ten.

      From java 1.7 the initial capacity is not ten, but zero.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      See documentation and compare with the source code

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Update the documentation of the empty constructor of ArrayList to:

      Constructs an empty list with an initial capacity of zero.
      ACTUAL -
      The documentation of the empty constructor of ArrayList says:

      Constructs an empty list with an initial capacity of ten.

      REPRODUCIBILITY :
      This bug can be reproduced always.

            smarks Stuart Marks
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: