Integrated: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes
Andrey Turbanov
aturbanov at openjdk.org
Wed Jan 11 15:18:20 UTC 2023
On Mon, 9 Jan 2023 20:55:14 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> `jdk.internal.jrtfs.JrtFileSystem#getFileAttributes` never return `null`
>
> https://github.com/openjdk/jdk/blob/679e485838881c1364845072af305fb60d95e60a/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java#L206-L213
> So, no need to check for `null` its result.
> Seems it was copied from ZipPath (name of variable suggests that) - https://github.com/openjdk/jdk/blob/master/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipPath.java#L769. But for ZipFileSystem `null` is expected.
This pull request has now been integrated.
Changeset: 4cd87f1b
Author: Andrey Turbanov <aturbanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4cd87f1bdab759ab7792afdcf644a6c3d21d51df
Stats: 6 lines in 1 file changed: 0 ins; 4 del; 2 mod
8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes
Reviewed-by: alanb, lancea
-------------
PR: https://git.openjdk.org/jdk/pull/11911
More information about the core-libs-dev
mailing list