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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: