Eliminate GuardedTypeConversion, DynamicLinker.getCurrentLinkRequest and its associated permission

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: core-libs
    • None
    • b89
    • generic
    • generic

        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.

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

                Created:
                Updated:
                Resolved: