RFR: 8324573: HashMap::putAll add notes for conservative resizing [v4]

Joshua Cao duke at openjdk.org
Wed Apr 3 01:37:38 UTC 2024


On Fri, 9 Feb 2024 14:05:56 GMT, Volker Simonis <simonis at openjdk.org> wrote:

>> Joshua Cao has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   extract msize variable
>
> I agree that a comment would be helpful but I'm afraid that it will not be of much help if its buried in the code. So instead maybe better add an `@implNote` to the `putAll()` method which describes the current, conservative resizing heuristic and give the advice that users can presize the destination map accordingly if they want to avoid resizing when merging in other maps.

@simonis Used your comment with some rewritten English

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17544#issuecomment-2033382004


More information about the core-libs-dev mailing list