-
Bug
-
Resolution: Fixed
-
P3
-
8u20
-
b40
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083435 | emb-9 | Andreas Eriksson | P3 | Resolved | Fixed | master |
JDK-8065439 | 8u45 | Andreas Eriksson | P3 | Resolved | Fixed | b01 |
JDK-8063103 | 8u40 | Andreas Eriksson | P3 | Resolved | Fixed | b14 |
JDK-8070879 | emb-8u47 | Andreas Eriksson | P3 | Resolved | Fixed | team |
SYNOPSIS
--------
Type annotations not retained during class retransformation
OPERATING SYSTEMS
-----------------
Tested on Linux, but the problem is believed to be platform independent.
FULL JDK VERSION(S)
-------------------
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)
PROBLEM DESCRIPTION
-------------------
Type annotations are not retained during class retransformation.
Observed behaviour:
--------
jdk-8u20/jdk1.8.0_20/jre/bin/java -javaagent:agent.jar -cp agent.jar
TestTypeAnnotationsAgent
Dump type annotations
@TestAnn(site=formalParameterAnnotation)
@TestAnn(site=returnTypeAnnotation)
@TestAnn(site=throwsAnnotation)
retransform
Dumping classfile to :
/tmp/TestTypeAnnotationsAgent$TypeAnnotatedTestClass.class
Dump type annotations
<no output>
--------
Expected behaviour:
Expect to see type annotations in the classfile provided to the transformer.
Please see documentation for JSR308, also section 4.7.20 of the Java virtual
machine spec.
TESTCASE
--------
Attached.
REPRODUCTION INSTRUCTIONS
-------------------------
1. java -javaagent:agent.jar -cp agent.jar TestTypeAnnotationsAgent
- backported by
-
JDK-8063103 Type annotations not retained during class redefine / retransform
- Resolved
-
JDK-8065439 Type annotations not retained during class redefine / retransform
- Resolved
-
JDK-8070879 Type annotations not retained during class redefine / retransform
- Resolved
-
JDK-8083435 Type annotations not retained during class redefine / retransform
- Resolved
- duplicates
-
JDK-8025934 Preserve type annotations through a class redefine
- Closed
- relates to
-
JDK-6422541 fix for {Constructor,Field,Method} annotation cache and RedefineClasses() conflict needs HS changes
- Resolved