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

Refactor code for reallocating storage

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
    • Resolved In Build:
      b22

      Description

      There are several places in JDK with similar logic:
      An array needs to be reallocated to increase the storage, taking into account the maximum allowed size of arrays.

      It's better to introduce a dedicated method for calculating required capacity. This would consolidate the logic in one place, reduce the code duplication and thus will reduce risk of bugs.

        Attachments

          Activity

            People

            Assignee:
            igerasim Ivan Gerasimov
            Reporter:
            igerasim Ivan Gerasimov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: