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

JSR 292: NoSuchMethodError and NoSuchFieldError in MHN_resolve_Mem

XMLWordPrintable

    • b114
    • generic
    • generic

      A typo in the function MHN_resolve_Mem():

        1109 if ((flags & ALL_KINDS) == IS_FIELD) {
        1110 THROW_MSG_NULL(vmSymbols::java_lang_NoSuchMethodError(), "field resolution failed");
        1111 } else if ((flags & ALL_KINDS) == IS_METHOD ||
        1112 (flags & ALL_KINDS) == IS_CONSTRUCTOR) {
        1113 THROW_MSG_NULL(vmSymbols::java_lang_NoSuchFieldError(), "method resolution failed");

      The NoSuchMethodError is thrown for the IS_FIELD.
      The NoSuchFieldError is thrown for the IS_METHOD & IS_CONSTRUCTOR.

      The fix should include an appropriate unit test case as it seems this issue is not covered by tests now.

            vlivanov Vladimir Ivanov
            sspitsyn Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: