RFR: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes
Andrey Turbanov
aturbanov at openjdk.org
Mon Jan 9 21:23:37 UTC 2023
`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.
-------------
Commit messages:
- [PATCH] Unnecessary null check in JrtPath.getAttributes
Changes: https://git.openjdk.org/jdk/pull/11911/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11911&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8299835
Stats: 5 lines in 1 file changed: 0 ins; 4 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/11911.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11911/head:pull/11911
PR: https://git.openjdk.org/jdk/pull/11911
More information about the core-libs-dev
mailing list