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

Simplify Nashorn's Context class loader handling

    Details

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

      Backports

        Description

        Nashorn Context objects currently have two class loaders: the one passed from the factory as the "application" class loader, as well as an optional "classpath" URL class loader loading classes specified by the optional -classpath command line argument. When a classPathLoader is present Context code is doing a lookup in classPathLoader with a fallback to appLoader. This should be simplified to a single class loader: when -classpath is specified the newly created URLClassLoader should simply have the appLoader as its parent.

          Activity

          Hide
          attila Attila Szegedi added a comment -
          nounit-hard: we'd need to create a setup with two classes with the same name coming from two different class loaders and verify that the one coming from the app loader is loaded.
          Show
          attila Attila Szegedi added a comment - nounit-hard: we'd need to create a setup with two classes with the same name coming from two different class loaders and verify that the one coming from the app loader is loaded.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/752ca580b176
          User: attila
          Date: 2015-11-09 13:03:43 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/752ca580b176 User: attila Date: 2015-11-09 13:03:43 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/752ca580b176
          User: lana
          Date: 2015-11-18 23:53:17 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/752ca580b176 User: lana Date: 2015-11-18 23:53:17 +0000

            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: