On Wed, 30 Oct 2024 20:44:39 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>> I decided to make this change. Thanks for the suggestion. > > 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 ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1608#discussion_r1823555881