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

Refactor code for reallocating storage

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • None
    • core-libs
    • b22

      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.

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

              Created:
              Updated:
              Resolved: