On Sat, 30 Apr 2022 08:56:23 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

> The method `java.util.zip.ZipFile.Source#get` could be improved by usage of 
> `Map.putIfAbsent` instead of separate `containsKey`/`get`/`put` calls. We 
> known that HashMap `java.util.zip.ZipFile.Source#files` can contain only 
> non-null values. And to check if putIfAbsent was successful or not we can 
> just compare result with `null`.
> It makes code a bit cleaner and faster.

Marked as reviewed by alanb (Reviewer).

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

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

Reply via email to