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

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P4
    • 24
    • Component/s: core-libs
    • None
    • behavioral
    • low
    • Some clients might have depended on the incorrect API behavior.
    • Java API
    • SE

      Summary

      Make MethodTypeDescImpl.resolveConstantDesc throw ClassNotFoundException instead of unchecked TypeNotPresentException.

      Problem

      ConstantDesc.resolveConstantDesc specifies that it throws ReflectiveOperationException upon resolution failure, but MethodTypeDescImpl throws TypeNotPresentException if it encounters an unresolvable ClassDesc entry. This is in violation of the specification.

      Solution

      Make MethodTypeDescImpl.resolveConstantDesc throw ClassNotFoundException, which is a type of ReflectiveOperationException.

      Specification

      No change in specification.

            Assignee:
            Chen Liang
            Reporter:
            Chen Liang
            Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: