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

(reflect) Exception types cannot be parameterized, rephrase getGenericExceptionTypes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b74
    • CPU:
      generic
    • OS:
      generic

      Description

      In JDK 5, core reflection was updated to support generics, often by adding a getGenericFoo sibling method to an existing getFoo method. The getGenericFoo methods include a standard requirement after the main functionality:

      "If a Foo is a parameterized type, the Type object returned for it must accurately reflect the actual type parameters used in the source code."

      However, in the case of java.lang.reflect.{Method, Constructor}.getGenericExceptionTypes, exceptions types cannot be parameterized so the requirement is at best vacuously true and should be removed to clarify the documentation.

        Attachments

          Activity

            People

            • Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: