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

Eliminate GuardedTypeConversion, DynamicLinker.getCurrentLinkRequest and its associated permission

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b89
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Eliminate both GuardedTypeConversion and DynamicLinker.getCurrentLinkRequest and its associated permission. Instead introduce a more robust scheme where GuardingTypeConverterFactory.convertToType takes a Supplier<MethodHandles.Lookup> parameter through which it can access the current lookup when needed, subject to the CallSiteDescriptor.getLookup security check. This also allows a more robust design where the TypeConverterFactory can decide on whether a converter is lookup-sensitive and thus not cacheable based on whether any of the converter factories actually retrieved the lookup object through the supplier; previously the factories had to be trusted with this decision by setting the GuardedTypeConversion.cacheable flag.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                attila Attila Szegedi
                Reporter:
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: