-
Bug
-
Resolution: Fixed
-
P4
-
9
In Jigsaw Milestone Ana, module boundaries will be enforced. Tests that use JDK internal APIs require adjustments to work with module boundaries.
Reflect related tests need to be re-examined and update to work with module boundaries:
* If test is intent for doing white-box testing, test need to be updated with the method provided by JDK-8049424 (something like -XX:AddModuleExports=<module>/<package>)
* Otherwise to eliminate the dependency on internal API
sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java
sun/reflect/CallerSensitive/MissingCallerSensitive.java
sun/reflect/Reflection/GetCallerClassTest.sh
sun/reflect/Reflection/GetCallerClassWithDepth.java
(Above tests seems intent to test the internal APIs, thus need to be updated with the method provided by JDK-8049424 for doing white-box testing)
java/lang/reflect/Generics/TestBadSignatures.java
--> sun.reflect.generics.**
sun/reflect/CallerSensitive/CallerSensitiveFinder.java
--> com.sun.tools.classfile.*
java/lang/annotation/AnnotationsInheritanceOrderRedefinitionTest.java
--> sun.reflect.annotation.AnnotationParser
java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java
--> jdk.internal.org.objectweb.asm.*
Reflect related tests need to be re-examined and update to work with module boundaries:
* If test is intent for doing white-box testing, test need to be updated with the method provided by JDK-8049424 (something like -XX:AddModuleExports=<module>/<package>)
* Otherwise to eliminate the dependency on internal API
sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java
sun/reflect/CallerSensitive/MissingCallerSensitive.java
sun/reflect/Reflection/GetCallerClassTest.sh
sun/reflect/Reflection/GetCallerClassWithDepth.java
(Above tests seems intent to test the internal APIs, thus need to be updated with the method provided by JDK-8049424 for doing white-box testing)
java/lang/reflect/Generics/TestBadSignatures.java
--> sun.reflect.generics.**
sun/reflect/CallerSensitive/CallerSensitiveFinder.java
--> com.sun.tools.classfile.*
java/lang/annotation/AnnotationsInheritanceOrderRedefinitionTest.java
--> sun.reflect.annotation.AnnotationParser
java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java
--> jdk.internal.org.objectweb.asm.*