RFR: 8287181: Avoid redundant HashMap.containsKey calls in InternalLocaleBuilder.setExtension

Naoto Sato naoto at openjdk.java.net
Tue May 24 13:11:40 UTC 2022


On Sat, 30 Apr 2022 17:10:55 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> No need to separately perform `HashMap.containsKey` before `HashMap.remove` call. If key is present - it will be removed anyway. If it's not present, nothing will be deleted.

Marked as reviewed by naoto (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/8488


More information about the core-libs-dev mailing list