RFR: 8341514: Add reducedMotion and reducedTransparency preferences [v4]
Andy Goryachev
angorya at openjdk.org
Wed Oct 9 18:22:13 UTC 2024
On Wed, 9 Oct 2024 18:11:48 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/javafx/application/preferences/PreferenceProperties.java line 199:
>>
>>> 197: */
>>> 198: @SuppressWarnings("unchecked")
>>> 199: public void setPlatformValue(Object value) {
>>
>> should this method be declared package protected?
>
> It doesn't really matter, since it's a nested class. The outer class has access to all members, regardless of visibility. Sometimes I use access modifiers in nested classes to informally document intent (which methods are supposed to be called by the outer class, and which are not). For consistency, I've added the `public` modifier to `fireValueChangeIfNecessary`.
you are probably right: it does not matter.
at first I thought that since the instances of `DeferredProperty` are public, one can use reflection to get to its public methods, but as we learned earlier, reflection will likely fail due to this class being unaccessible.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1592#discussion_r1793962681
More information about the openjfx-dev
mailing list