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

Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • core-libs
    • b18

      Across the JDK code base, `Integer.MAX_VALUE - 8` is used as a conservative value for the maximum array size supported in the JVM.

      Code using this number could benefit from using the constant ArraySupport.SOFT_MAX_ARRAY_LENGTH instead, which also has good documentation.

      This issue focuses on code and tests in java.base, there are still a few instances outside java.base which are not in scope for this change.

            eirbjo Eirik Bjørsnøs
            eirbjo Eirik Bjørsnøs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: