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

Nashorn's ScriptLoader split delegation has to be adjusted

    Details

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

      Backports

        Description

        Nashorn's ScriptLoader uses Context's "appLoader" as it's parent loader. But it's loadClass delegates to StructureLoader first for nashorn and nashorn generated classes.

        With the new parent/child Layer of Modules, StructureLoader created Layer is parent layer of ScriptLoader created Layer. So, it is better if the class loader delegation is from ScriptLoader to StructureLoader. And then split delegation to non-nashorn classes (from findClass) to Context's appLoader. Note that the split delegation is still needed. Without that certain caller class loader based class resolutions will not work.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sundar Sundararajan Athijegannathan
                  Reporter:
                  sundar Sundararajan Athijegannathan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: