On Tue, 15 Dec 2020 19:52:31 GMT, Andrey Turbanov <github.com+741251+turban...@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