-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
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.
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.