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

ArrayDeque documentation does not specify the maximum value for numElements

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      ADDITIONAL SYSTEM INFORMATION :
      https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html

      A DESCRIPTION OF THE PROBLEM :
      Documentation should specify a maximum value for numElements parameter. ArrayDeque constructor can throw OutOfMemoryError when executing the following program in other JVMs (e.g. Eclipse OpenJ9):

      import java.util.ArrayDeque;
      public class A {
          public static void main(String[] args) {
              new ArrayDeque(Integer.MAX_VALUE);
          }
      }


        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: