-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b26
-
generic
-
generic
-
Verified
Filed By : JCK team
JDK : java full version "1.6.0-fcs"
JCK : 6a
Platform[s] : FAIL - seems to be all
switch/Mode : default
JCK test owner : http://javaweb.sfbay/jcce/tcks/jck/docs/others/owners.jto
Failed tests:
api/java_lang/instrument/Instrumentation/index.html#Instrumentation[Instrumentation221]
api/java_lang/instrument/Instrumentation/attach.html#InstrumentationAttach[Instrumentation221]
Problem description
===================
The javadoc specification for the Instrumentation.isRetransformClassesSupported() method at:
http://java.sun.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#isRetransformClassesSupported()
states as follows:
---Excerpt-from-spec---
The ability to retransform an already loaded class is an optional capability of a JVM.
Retransformation will only be supported if the Can-Retransform-Classes manifest attribute
is set to true in the agent JAR file (as described in the package specification) and
the JVM supports this capability.
---End-of-excerpt---
However, when 'Can-Retransform-Classes' manifest attribute does not exist in manifest file
or when it is set to 'false', the call of isRetransformClassesSupported() still returns 'true'.
Please see attached minimized test (test.tar.gz) to reproduce the failure.
Minimized test output:
======================
>java -javaagent:agent1.jar -javaagent:agent2.jar Test
FAILED: agent1 unexpectedly supports retransformation
FAILED: agent2 unexpectedly supports retransformation
main is invoked
Additional info:
================
> uname -a
SunOS d-espb04-125-170 5.10 Generic_118833-33 sun4u sparc SUNW,Ultra-60
JDK : java full version "1.6.0-fcs"
JCK : 6a
Platform[s] : FAIL - seems to be all
switch/Mode : default
JCK test owner : http://javaweb.sfbay/jcce/tcks/jck/docs/others/owners.jto
Failed tests:
api/java_lang/instrument/Instrumentation/index.html#Instrumentation[Instrumentation221]
api/java_lang/instrument/Instrumentation/attach.html#InstrumentationAttach[Instrumentation221]
Problem description
===================
The javadoc specification for the Instrumentation.isRetransformClassesSupported() method at:
http://java.sun.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#isRetransformClassesSupported()
states as follows:
---Excerpt-from-spec---
The ability to retransform an already loaded class is an optional capability of a JVM.
Retransformation will only be supported if the Can-Retransform-Classes manifest attribute
is set to true in the agent JAR file (as described in the package specification) and
the JVM supports this capability.
---End-of-excerpt---
However, when 'Can-Retransform-Classes' manifest attribute does not exist in manifest file
or when it is set to 'false', the call of isRetransformClassesSupported() still returns 'true'.
Please see attached minimized test (test.tar.gz) to reproduce the failure.
Minimized test output:
======================
>java -javaagent:agent1.jar -javaagent:agent2.jar Test
FAILED: agent1 unexpectedly supports retransformation
FAILED: agent2 unexpectedly supports retransformation
main is invoked
Additional info:
================
> uname -a
SunOS d-espb04-125-170 5.10 Generic_118833-33 sun4u sparc SUNW,Ultra-60