Uploaded image for project: 'Clojure'
  1. CLJ-1663

DynamicClassLoader delegates to parent classloader before checking in its URL list

    Details

    • Approval:
      Ok
    • Patch:
      Code

      Description

      See Cursive #748. Cursive calls into Leiningen in-process, and before doing that it creates a new DynamicClassLoader which uses an IntelliJ PluginClassLoader as its parent. This is throwing a CNFE, although the URL containing the class is present in the DynamicClassLoader URL list.

      Cause: The patch for CLJ-979 Closed added an implementation of loadClass that delegates to "getParent().loadClass()", which in this case delegates to PluginClassLoader.loadClass(). This was incorrect as the current implementation should have been to delegate to the loadClass method of the superclass, which will take care of delegating to the loadClass method of the parent class loader if necessary.

      Approach: The proposed patch replaces the call to "getParent().loadClass()" with a call "super.loadClass()" fixing this issue.

      Screened by: Alex Miller

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bronsa Nicola Mometto
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: