mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8206123: ArrayDeque created with default constructor can only hold 15 elements
Reviewed-by: martin, psandoz, igerasim
This commit is contained in:
parent
859ba8ca28
commit
fce671f409
2 changed files with 154 additions and 1 deletions
|
@ -180,7 +180,7 @@ public class ArrayDeque<E> extends AbstractCollection<E>
|
|||
* sufficient to hold 16 elements.
|
||||
*/
|
||||
public ArrayDeque() {
|
||||
elements = new Object[16];
|
||||
elements = new Object[16 + 1];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue