Re: RFR: 8305538: Avoid redundant HashMap.containsKey call in ModuleDescriptor.Builder [v2]

2023-05-22 Thread Andrey Turbanov
On Tue, 4 Apr 2023 20:50:00 GMT, Andrey Turbanov wrote: >> `Map.containsKey` call is sometimes unnecessary, when it's known that `Map` >> doesn't contain `null` values. >> Instead of pair containsKey+put we can use putIfAbsent and compare result >> with null. >> Result code is shorter and a

Re: RFR: 8305538: Avoid redundant HashMap.containsKey call in ModuleDescriptor.Builder [v2]

2023-04-04 Thread Andrey Turbanov
> `Map.containsKey` call is sometimes unnecessary, when it's known that `Map` > doesn't contain `null` values. > Instead of pair containsKey+put we can use putIfAbsent and compare result > with null. > Result code is shorter and a bit faster. Andrey Turbanov has updated the pull request