RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v2]
Alan Bateman
alanb at openjdk.java.net
Wed Dec 16 07:16:00 UTC 2020
On Tue, 15 Dec 2020 19:52:31 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:
>> 8258422: Cleanup unnecessary null comparison before instanceof check in java.base
>
> Andrey Turbanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>
> - 8258422: Cleanup unnecessary null comparison before instanceof check in java.base
> use instanceof pattern matching
> - 8258422: Cleanup unnecessary null comparison before instanceof check in java.base
src/java.base/windows/classes/sun/nio/fs/WindowsPath.java line 803:
> 801: if (obj instanceof WindowsPath path) {
> 802: return compareTo(path) == 0;
> 803: }
Can you do the same in UnixPath?
-------------
PR: https://git.openjdk.java.net/jdk/pull/20
More information about the nio-dev
mailing list