File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3776,7 +3776,12 @@ void VM_RedefineClasses::AdjustAndCleanMetadata::do_klass(Klass* k) {
37763776void VM_RedefineClasses::update_jmethod_ids () {
37773777 for (int j = 0 ; j < _matching_methods_length; ++j) {
37783778 Method* old_method = _matching_old_methods[j];
3779- assert (old_method->method_idnum () < _matching_methods_length,
3779+ // The method_idnum should be within the range of 1..number-of-methods
3780+ // until incremented later for obsolete methods.
3781+ // The increment is so if a jmethodID is created for an old obsolete method
3782+ // it gets a new jmethodID cache slot in the InstanceKlass.
3783+ // They're cleaned out later when all methods of the previous version are purged.
3784+ assert (old_method->method_idnum () <= _old_methods->length (),
37803785 " shouldn't be incremented yet for obsolete methods" );
37813786 jmethodID jmid = old_method->find_jmethod_id_or_null ();
37823787 if (jmid != nullptr ) {
You can’t perform that action at this time.
0 commit comments