On Thu, 7 Nov 2024 14:13:16 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> modules/javafx.base/src/main/java/com/sun/javafx/SecurityUtil.java line 48: >> >>> 46: * @throws UnsupportedOperationException if the security manager is >>> enabled >>> 47: */ >>> 48: public static void checkSecurityManager() { >> >> Can we cache the results of the check? > > I thought about doing that. In fact, I even coded it up, but since it only > called at most 4 times (once for each of the 4 call sites) at startup, I > wasn't sure it was worth it. I don't mind either way. > > @arapte do you have an opinion? Given that usage of this method is very limited and it would not change in future. It seems Ok not to cache the result. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1627#discussion_r1833932804