On Mon, 29 Nov 2021 08:01:56 GMT, Andrey Turbanov <d...@openjdk.java.net> wrote:
>> src/java.desktop/macosx/classes/com/apple/laf/AquaRootPaneUI.java line 78: >> >>> 76: final Component parent = c.getParent(); >>> 77: >>> 78: if (parent instanceof JFrame frameParent) { >> >> The `frameParent` variable was declared `final` before. >> Suggestion: >> >> if (parent instanceof final JFrame frameParent) { > > Does it really worth keeping `final` here? > In my opinion it makes code unnecessary longer and harder to read in this case Agree, `final` doesn't add much value, it's clear the value of `frameParent` doesn't change in the following three lines. ------------- PR: https://git.openjdk.java.net/jdk/pull/5482