RFR: 8305696: (zipfs) Avoid redundant LinkedHashMap.containsKey call ZipFileSystem.makeParentDirs
Andrey Turbanov
aturbanov at openjdk.org
Sun Apr 9 11:25:04 UTC 2023
On Mon, 3 Apr 2023 17:16:26 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> `LinkedHashMap<IndexNode, IndexNode>` `ZipFileSystem.inodes` contains only non-null values. It means instead of separate `containsKey`+`get` calls, we can use single `LinkedHashMap.get` call and then compare result with `null`.
> Result code is a bit simpler and faster.
>
> Testing: Linux x64 `java/nio`, `jdk/nio`
Thank you for review!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13304#issuecomment-1501105487
More information about the nio-dev
mailing list