Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8219599

Deleting method with RedefineClasses breaks java.lang.reflect.Method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 13
    • 13
    • hotspot
    • None

      If you create a java.lang.reflect.Method to a Method that is deleted during redefinition, the method.invoke gets InternalError exception, and not a NoSuchMethodError wrapped in InvocationTargetException. If you add the method back, you still get InternalError.

      from reflection.cpp:

        InstanceKlass* klass = InstanceKlass::cast(java_lang_Class::as_Klass(mirror));
        Method* m = klass->method_with_idnum(slot);
        if (m == NULL) {
          THROW_MSG_0(vmSymbols::java_lang_InternalError(), "invoke");
        }

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: