RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v14]
Johan Sjölen
jsjolen at openjdk.org
Tue Nov 7 15:24:52 UTC 2023
On Tue, 7 Nov 2023 14:29:34 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> More descriptive name and uniform argument order
>
> src/hotspot/share/utilities/growableArray.hpp line 437:
>
>> 435: this->_len = i+1;
>> 436: }
>> 437: ::new (&this->_data[i]) E(elem);
>
> I think this needs to be guarded (there might already be an element at `i`)
Thanks Leo, I fixed the bug and some style issues along with it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1385096353
More information about the hotspot-dev
mailing list