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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 17
    • Affects Version/s: 17
    • Component/s: 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.

              Assignee:
              Mandy Chung (Inactive)
              Reporter:
              Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: