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

Using 'OR' and 'AND' in SQL Server -

python - Finding intersection between ellipse and a line -

c++ - NetBeans Remote Development with additional configuration -