-
Bug
-
Resolution: Unresolved
-
P5
-
8
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.
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.
- duplicates
-
JDK-8170690 ArrayList() says it constructs a list with a capacity of ten but it does not.
-
- Closed
-
-
JDK-8271449 ArrayList empty constructor documentation is misleading
-
- Closed
-
-
JDK-8283067 Incorrect comment in java.base/share/classes/java/util/ArrayList.java
-
- Closed
-
-
JDK-8305240 Erroneous description of the constructor ArrayList()
-
- Closed
-
-
JDK-8226372 ArrayList default constructor documentation states wrong initial capacity
-
- Closed
-