libs/src/java_lang/metadata/Phase2/BinaryCompatibility/ChangeDefaults/ChangeDefaultTest1
If one tries to load the compiled annotation interface using custom classloader
and then tries to read the annotation from compiled class, the value one gets is null. Where as if one puts the directory from where annotation interface is being loaded in classpath while executing, one can read the annotations.
Please use the attached ChangeDefaultTest1.tar
How to reproduce:-
Untar the ChangeDefaultTest1.tar
cd ChangeDefaultTest1/Helper directory
copile the source files *.java
copy A.class file to ChangeDefaultTest1 directory
cd to ChangeDefaultTest1 directory
compile the source files *.java
execute the test case
java ChangeDefaultTest1 absolute path to Helper directory
like java ChangeDefaultTest1 /home/js130994/ChangeDefaultTest1/Helper
One can see the output like:-
The class got is :interface Test1
The first value got is :null
The value got after modification is :null
if while executing the same classpath .:./Helper is being specified things work fine.
Is it because of different namespaces.
Tried with Tiger-Beta2 build-41 on Solaris-9
Some modifications for proper using of DKFL automation.
java_lang/metadata/Phase2/BinaryCompatibility/ChangeDefaults/ChangeDefaultTest1
If one tries to load the compiled annotation interface using custom classloader
and then tries to read the annotation from compiled class, the value one gets is null. Where as if one puts the directory from where annotation interface is being loaded in classpath while executing, one can read the annotations.
Please use the attached ChangeDefaultTest1.tar
How to reproduce:-
Untar the ChangeDefaultTest1.tar
cd ChangeDefaultTest1/Helper directory
copile the source files *.java
copy A.class file to ChangeDefaultTest1 directory
cd to ChangeDefaultTest1 directory
compile the source files *.java
execute the test case
java ChangeDefaultTest1 absolute path to Helper directory
like java ChangeDefaultTest1 /home/js130994/ChangeDefaultTest1/Helper
One can see the output like:-
The class got is :interface Test1
The first value got is :null
The value got after modification is :null
if while executing the same classpath .:./Helper is being specified things work fine.
Is it because of different namespaces.
Tried with Tiger-Beta2 build-41 on Solaris-9
Some modifications for proper using of DKFL automation.
java_lang/metadata/Phase2/BinaryCompatibility/ChangeDefaults/ChangeDefaultTest1
- relates to
-
JDK-6537080 Annotation API should allow developers to specify which ClassLoader instance to use for classloading
- Closed
-
JDK-6898835 @SupportedAnnotationTypes.value awkward & unsafe; prefer Class[]
- Closed