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

Convert dynamic proxy to hidden classes

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Dynamic proxy is serializable and supported by the default serialization. On the other hand, hidden classes cannot use default serialization since it does not have a binary name. Instead it has to use a custom serialization mechanism. The serialization story will need to be sorted out.

      Proxy is specified to be created with same protection domain as the system classes loaded by the bootstrap class loader such that this permission check will pass through this frame. Hidden class is defined with the same protection domain as the lookup class. This is a spec change and also needs to look into the permissions required.

      In addition, Lookup::defineHiddenClass requires a Lookup object of the same package. Dynamic proxy may inject a proxy class in an empty package. This may need a way to obtain a Lookup for a non-existing package for an unnamed module but a Lookup for an existing package for a named module. This can be workaround to inject a shim class in an empty package that use its Lookup to inject hidden proxy classes.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: