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

Nashorn's ScriptLoader split delegation has to be adjusted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • b122
    • generic
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: