java - Is it acceptable to globally and finally store the check for a SecurityManager -


is acceptable globally , store check security manager?

given following line of code:

public static final boolean sec_on = (system.getsecuritymanager() != null); 

would acceptable place in library , reuse result throughout lifetime of jvm?

why? or why not?

[update] similar code exists in reference implementation of java ee - jsp specification. app server/servlet container uses not support dynamic configuration of securitymanager.

no. security manager can installed @ time if not present initially.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

visual studio - TFS will not accept changes I've made to a Java project -