Per 4988776 "JVMTI Spec: BCI and class sharing", features are added to the JVMTI spec for selection of unmodifiable classes (the capabilities can_redefine_any_class and can_generate_all_class_hook_events) and an error on attempting to redefine an unmodifiable class (JVMTI_ERROR_UNMODIFIABLE_CLASS).
Most of the features will not be turned on until 5002268 "Allow class sharing use with RedefineClasses" is done in HotSpot. At or before that time, the SDK JVMTI agents need to be updated to use these features.
5002026 "java.lang.instrument: BCI and unmodifable classes" adds API features to java.lang.instrument which correspond to the new error (UnmodifiableClassError). Yet won't fully use or activate these features since the underlying mechanism isn't there (see bug in paragraph above).
This bug is to add those features. Specifically, any of the following which were not done in 5002026:
Cause the JVMTI_ERROR_UNMODIFIABLE_CLASS to throw UnmodifiableClassError.
Set the new capabilities at agent initialization:
Neither for instrument agent
can_redefine_any_class for the JPDA back-end
Probably can_generate_all_class_hook_events for hprof
###@###.### 2004-02-26