RFR 8048052: Permission tests for "setFactory"
Sean Mullan
sean.mullan at oracle.com
Mon Aug 18 13:09:32 UTC 2014
On 07/28/2014 05:04 AM, FELIX YANG wrote:
> Please review a new test to "setFactory" permission. It is to address
> that "setFactory" permission is required or not as expected in a series
> of classes/methods under java.net.
>
> JDK Issue: https://bugs.openjdk.java.net/browse/JDK-8048052
> Webrev: http://cr.openjdk.java.net/~rhalade/8048052/webrev.00/
1. Typo on line 30:
-Djava.security.manger
should be:
-Djava.security.manager
However, setting of the java.security.manager on the command line with
jtreg is discouraged. I would instead replace this with a /policy option
and a policy file that grants no permissions.
2. On line 80:
80 } catch (AccessControlException e) {
The APIs are defined to throw SecurityException, so even though this
works with the SecurityManager, the test should catch SecurityException
instead.
--Sean
More information about the security-dev
mailing list