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

java - How to Configure JAXRS and Spring With Annotations -

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

php - Create image in codeigniter on the fly -