RFR: 8352638: Enhance code consistency: java.desktop/windows

Sergey Bylokhov serb at openjdk.org
Fri Apr 4 00:08:49 UTC 2025


On Thu, 3 Apr 2025 20:01:21 GMT, Phil Race <prr at openjdk.org> wrote:

>The pattern below seems odd. What is the point of the protected modifier on a final class ?

This(and similar) logic was copied from [Metal](https://github.com/openjdk/jdk/blob/57df89c46449a19bb626fee2ea01c868e6dfb712/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java#L1164) L&F, where this and similar classes are protected and part of the public API.

I can certainly change that, but it would make the review process even more difficult. However, this change would at least demonstrate that the class is not subclassed, allowing us to adjust the access level later. This question is actually applicable to many "protected" methods in the updated classes.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24170#issuecomment-2777245492


More information about the client-libs-dev mailing list