> > +    /*
> > +     * Install a SecurityManager along with a default Policy to allow 
> > testNG to
> > +     * run when there is a security manager.
> > +     */
> > +    private JAXPPolicyManager() {
> > +        // Backing up policy and security manager for restore
> > +        policyBackup = Policy.getPolicy();
> > +        smBackup = System.getSecurityManager();
> > +
> > +        // Set customized policy
> > +        setDefaultPermissions();
> > +        Policy.setPolicy(policy);
> > +        System.setSecurityManager(new SecurityManager());
> > +    }
> 
> Will the test suite be configured to run with and without
> SecurityManager? It seems to me, with a TestNG test listener, a
> SecurityManager is always installed. I don't seem to see it checks
> whether the test shall run with a SecurityManager.
> 
> -Joe
> 

It's same as the original code, I think it's to be ready for running in agent 
mode.

Frank

Reply via email to