private static boolean hasSecurityManager(){
  return (System.getSecurityManager() != null);
}

private static boolean hasSecurityManager ( ) { return ( System . getSecurityManager ( ) != null ) ; }
checks if the vm currently has a securitymanager installed . note that this may change over time . so the result of this method should not be cached .
