RFR: 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes [v2]
Lance Andersen
lancea at openjdk.org
Tue Jan 10 12:08:52 UTC 2023
On Tue, 10 Jan 2023 09:14:11 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.
>
> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>
> 8299835: (jrtfs) Unnecessary null check in JrtPath.getAttributes
>
> update copyright year
Marked as reviewed by lancea (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/11911
More information about the core-libs-dev
mailing list