[Nestmates] RFR: 8199309: [Nestmates] The new Class nestmate methods should have SecurityManager checks
David Holmes
david.holmes at oracle.com
Mon Mar 12 20:19:38 UTC 2018
Hi Mandy,
On 13/03/2018 4:20 AM, mandy chung wrote:
>
>
> On 3/12/18 12:05 AM, David Holmes wrote:
>>
>> http://cr.openjdk.java.net/~dholmes/8199309/webrev.v2/
>>
>
> The patch looks okay.
Thanks for looking through this again.
> 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
Won't this hit module access checks rather than package access? I think
I prefer to not complicate things by introducing module patching.
Thanks,
David
> 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