Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5015623

(ann) cannot read annotation when interface is loaded using custom class loader

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic, solaris_8

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                jsinghsunw Jit Singh (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: