RFR: 8342453: Remove calls to doPrivileged in javafx.graphics/com.sun.javafx.tk [v2]
Andy Goryachev
angorya at openjdk.org
Wed Oct 30 22:58:33 UTC 2024
On Wed, 30 Oct 2024 22:51:30 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> This looks useful.
>> I wonder if it would make sense to create a utility method in some common Util class?
>>
>>
>> public static boolean initBoolean(BooleanSupplier c) { return c.getAsBoolean(); }
>>
>>
>> edit:
>> maybe in `com.sun.javafx.util.Utils`
>
> We could, but I don't see enough value in doing it. The only thing you would save is the explicit cast to `(Supplier<Boolean>)` and the `.get()`.
>
> Rather than that, it might be useful (as a follow-up, not as part of the various doPriv removal PRs), to have a centralized utility method that also did the reading and parsing of the property. I'm fairly certain we already have some localized methods of this sort somewhere.
>
> In any case, I don't want to make a refactoring change that relies on a new utility method as part of this effort
ok
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1608#discussion_r1823560575
More information about the openjfx-dev
mailing list