RFR (JAXP) JDK-8067170: Enable security manager on JAXP unit tests
Frank Yuan
frank.yuan at oracle.com
Thu Jul 28 09:56:19 UTC 2016
> > + /*
> > + * 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
More information about the core-libs-dev
mailing list