summaryrefslogtreecommitdiff
path: root/src/repl/scala/tools/nsc/interpreter/IMain.scala
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2014-10-15 17:03:02 -0700
committerHeather Miller <heather.miller@epfl.ch>2014-11-05 10:56:52 -0800
commitf65c43094141169c76c189ad97bfca32f4508284 (patch)
treec58edcdb2fefaf1e10e25d0cc322dc38d67634da /src/repl/scala/tools/nsc/interpreter/IMain.scala
parenta84abd088df0105c542aa3192de5a634f3ceda35 (diff)
downloadscala-f65c43094141169c76c189ad97bfca32f4508284.tar.gz
scala-f65c43094141169c76c189ad97bfca32f4508284.tar.bz2
scala-f65c43094141169c76c189ad97bfca32f4508284.zip
SI-6502 Addresses @som-snytt's feedback
Diffstat (limited to 'src/repl/scala/tools/nsc/interpreter/IMain.scala')
-rw-r--r--src/repl/scala/tools/nsc/interpreter/IMain.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/repl/scala/tools/nsc/interpreter/IMain.scala b/src/repl/scala/tools/nsc/interpreter/IMain.scala
index 4f035bae7a..01b46541cd 100644
--- a/src/repl/scala/tools/nsc/interpreter/IMain.scala
+++ b/src/repl/scala/tools/nsc/interpreter/IMain.scala
@@ -86,8 +86,7 @@ class IMain(@BeanProperty val factory: ScriptEngineFactory, initialSettings: Set
private var _classLoader: util.AbstractFileClassLoader = null // active classloader
private val _compiler: ReplGlobal = newCompiler(settings, reporter) // our private compiler
- private trait ExposeAddUrl extends URLClassLoader { def addNewUrl(url: URL) = this.addURL(url) }
- private var _runtimeClassLoader: URLClassLoader with ExposeAddUrl = null // wrapper exposing addURL
+ private var _runtimeClassLoader: URLClassLoader = null // wrapper exposing addURL
def compilerClasspath: Seq[java.net.URL] = (
if (isInitializeComplete) global.classPath.asURLs
@@ -252,7 +251,7 @@ class IMain(@BeanProperty val factory: ScriptEngineFactory, initialSettings: Set
*/
def addUrlsToClassPath(urls: URL*): Unit = {
new Run // force some initialization
- urls.foreach(_runtimeClassLoader.addNewUrl) // Add jars to runtime classloader
+ urls.foreach(_runtimeClassLoader.addURL) // Add jars to runtime classloader
extendCompilerClassPath(urls: _*) // Add jars to compile-time classpath
}
@@ -381,7 +380,7 @@ class IMain(@BeanProperty val factory: ScriptEngineFactory, initialSettings: Set
}
private def makeClassLoader(): util.AbstractFileClassLoader =
new TranslatingClassLoader({
- _runtimeClassLoader = new URLClassLoader(compilerClasspath, parentClassLoader) with ExposeAddUrl
+ _runtimeClassLoader = new URLClassLoader(compilerClasspath, parentClassLoader)
_runtimeClassLoader
})