JDK-5067523 : Instrumentation.redefineClasses does not throw UnmodifiableClassException
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-06-24
  • Updated: 2004-11-20
  • Resolved: 2004-11-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b14Fixed
Related Reports
Relates :  
Description
java.lang.instrument.Instrumentation.redefineClasses is specified to throw UnmodifiableClassException if a specified class cannot be redefined. However the implementation (as of tiger-b57) throws java.lang.InternalError instead.

Note that this bug requires hotpot/jvmti bug 5067517 to be fixed in order for JVMTI to return the UNMODIFIABLE_ERROR needed to throw the checked exception.
###@###.### 11/3/04 21:21 GMT

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
17-08-2004

SUGGESTED FIX ------- JPLISAgent.c ------- *** /tmp/sccs.8Ca48z Mon Aug 16 15:57:54 2004 --- JPLISAgent.c Fri Aug 13 18:28:46 2004 *************** *** 904,915 **** throwableToMap, "java/lang/ClassNotFoundException") ) { mappedThrowable = throwableToMap; ! } ! else { ! jstring message = NULL; ! message = getMessageFromThrowable(jnienv, throwableToMap); ! mappedThrowable = createInternalError(jnienv, message); } jplis_assert(isSafeForJNICalls(jnienv)); --- 904,920 ---- throwableToMap, "java/lang/ClassNotFoundException") ) { mappedThrowable = throwableToMap; ! } else { ! if ( isInstanceofClassName( jnienv, ! throwableToMap, ! "java/lang/instrument/UnmodifiableClassException")) { ! mappedThrowable = throwableToMap; ! } else { ! jstring message = NULL; ! message = getMessageFromThrowable(jnienv, throwableToMap); ! mappedThrowable = createInternalError(jnienv, message); ! } } jplis_assert(isSafeForJNICalls(jnienv)); ###@###.### 2004-08-16
16-08-2004

EVALUATION Too late for tiger - only primitive and array types are impacted so can wait until next release. ###@###.### 2004-06-23
23-06-2004