[Nestmates] RFR: 8199309: [Nestmates] The new Class nestmate methods should have SecurityManager checks

mandy chung mandy.chung at oracle.com
Mon Mar 12 18:20:21 UTC 2018



On 3/12/18 12:05 AM, David Holmes wrote:
>
> http://cr.openjdk.java.net/~dholmes/8199309/webrev.v2/
>

The patch looks okay.

About the new test TestSecurityManagerChecks.java, it appends testPkg.* 
classes in bootclasspath.   Alternatively, you can use the jtreg support 
to patch java.base to add test classes in an existing java.base 
package.  For example, you could have
test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/java.base/jdk/internal/misc/Host.java

Then the test can be simplified and easier to understand.  No need to 
run ClassFileInstaller nor change the "package.access" security 
property.  Just run build the classes and run the test directly:

@build java.base/jdk.internal.misc
@run main/othervm TestSecurityManagerChecks

Mandy

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/tip/test/jdk/java/lang/invoke/lookup/ReflectiveLookupTest.java
[2] 
http://hg.openjdk.java.net/jdk/jdk/file/tip/test/jdk/java/lang/StackWalker/CallerSensitiveMethod/ 



More information about the valhalla-dev mailing list