On Wed, 7 May 2025 15:11:58 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>>> --add-opens javafx.graphics/com.sun.javafx.application.preferences=andy_test
>> 
>> You can access any number of internal classes or methods with 
>> "--add-exports" or "--add-opens", so that is not a valid argument.
>
> okay

Further, if you call `setAccessibile` in connection with `--add-opens`, which 
your above code snippet does, you can even call _private_ methods.

So at the risk of repeating myself, there is no concern that making this method 
public exposes it to applications. However, making it package-scope if it 
doesn't need to be public, is a best practice if it doesn't need to be accessed 
outside the package.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1655#discussion_r2077898653

Reply via email to