File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/compiler/scala/tools/nsc/plugins Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -152,9 +152,9 @@ object Plugin {
152
152
153
153
val fromLoaders = paths.map {path =>
154
154
val loader = findPluginClassloader(path)
155
- loader.getResources (PluginXML ).asScala.toList.lastOption match {
156
- case None => Failure (new MissingPluginException (path))
157
- case Some ( url) =>
155
+ loader.getResource (PluginXML ) match {
156
+ case null => Failure (new MissingPluginException (path))
157
+ case url =>
158
158
val inputStream = url.openStream
159
159
try {
160
160
Try ((PluginDescription .fromXML(inputStream), loader))
Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ trait Plugins { global: Global =>
62
62
/**
63
63
* Locate or create the classloader to load a compiler plugin with `classpath`.
64
64
*
65
- * Subclasses may override to customise the behaviour.
65
+ * Subclasses may override to customise the behaviour. The returned classloader must return the first
66
+ * from plugin descriptor from `classpath` when `getResource("scalac-plugin.xml")` is called.
66
67
*
67
68
* @param classpath
68
69
* @return
You can’t perform that action at this time.
0 commit comments