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

Proxy::newProxyInstance and MethodHandleProxies::asInterfaceInstance should reject sealed interfaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 17
    • 17
    • core-libs
    • None

        Creating as a P2 for now as this may need attention in Java 17.

        Proxy.newProxyInstance doesn't specify how it deals with sealed interfaces. I suspect we may need to update the list of restrictions so that IllegalArgumentException is thrown if an interface is sealed.

        As things stand, a confusing IncompatibleClassChangeError will be thrown when attempting to define the proxy class.

              mchung Mandy Chung
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: