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

MethodTypeDesc throws an unchecked exception than ReflectiveOperationException when a component class cannot be resolved

XMLWordPrintable

    • b08

      Consider this:

          var t = MethodTypeDesc.of(ClassDesc.of("DoesNotExist"));
          t.resolveConstantDesc(MethodHandles.lookup());

      ConstantDesc.resolveConstantDesc specifies that a checked ReflectiveOperationException is thrown if a class cannot be resolved, yet MethodTypeDesc.resolveConstantDesc throws an unchecked TypeNotPresentException.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: