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

(ann) ClassLoader RuntimeVisibleAnnotations lost after RedefineClasses

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 6u18
    • core-libs
    • None
    • generic
    • solaris

      JCov tool, used for code coverage analisys, found that after dynamically class file instrumentation, @java.lang.Deprecated runtime visible annotation can't be achieved using reflection under Solaris machines.

      This reproduced for JDK6 and JDK7 builds.

      To reproduce this, try JCov.jar from attach, which contains sample Transformation Agent and sample class with reflection code. Src's are also attached.

      Then run:
      java -javaagent:JCov/dist/JCov.jar=blabla NewClass blabla

      Under linux x86-64 1.6.0_20 output will be:
      Loading ClassLoader
      @java.lang.Deprecated()

      Under solaris-sparc 6u18_b05:
      Loading ClassLoader

      only.

      Note, that JCov.jar contains manifest with some custom properties that affect instrumentation and used by JCov.

      In java.lang area problems with:
      java.lang.ClassLoader.defineClass: anno 0 java.lang.Deprecated()
      java.lang.String.getBytes: anno 0 java.lang.Deprecated()
      java.lang.Thread.stop: anno 0 java.lang.Deprecated()
      java.lang.Thread.stop: anno 0 java.lang.Deprecated()

            Unassigned Unassigned
            sborodinsunw Sergey Borodin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: