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

Proxy::newProxyInstance spec should specify the behavior if a given proxy interface is hidden

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
      None

      Description

      `Proxy::newProxyInstance` throws IAE if a given proxy interface is hidden since a hidden interface can't be named in another class. The current implementation does throw IAE:

      java.lang.IllegalArgumentException: HiddenInterface/0x0000000800c8f840 referenced from a method is not visible from class loader

      The spec should be updated to specify that IAE will be thrown if a proxy interface is hidden. In addition, the exception message can be improved and indicates a proxy interface can't be hidden.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mchung Mandy Chung
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: