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

(reflect) Create common superclass of reflective exceptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 5.0, 6, 7
    • core-libs
    • None
    • b68
    • generic, x86
    • generic, windows_xp

      There are at least a half dozen semantically related checked exceptions thrown by methods in the core reflection classes, java.lang.Class and java.lang.reflect.*:

      java.lang.NoSuchMethodException
      java.lang.NoSuchFieldException
      java.lang.ClassNotFoundException
      java.lang.InstantiationException
      java.lang.IllegalAccessException
      java.lang.reflect.InvocationTargetException

      Programming using reflection would be more convenient if there was a common superclass more specific than Exception so that all these conditions could be caught with one catch block.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: