aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/eval/Eval.scala8
1 files changed, 2 insertions, 6 deletions
diff --git a/libraries/eval/Eval.scala b/libraries/eval/Eval.scala
index 3c3efc8..07f684c 100644
--- a/libraries/eval/Eval.scala
+++ b/libraries/eval/Eval.scala
@@ -314,12 +314,8 @@ class Eval(target: Option[File]) {
* This is probably fragile.
*/
lazy val impliedClassPath: List[String] = {
- val loader = this.getClass.getClassLoader.asInstanceOf[URLClassLoader]
- val currentClassPath = loader.getURLs filter {
- _.getProtocol == "file"
- } map { u =>
- new File(u.toURI).getPath
- } toList
+ val currentClassPath = this.getClass.getClassLoader.asInstanceOf[URLClassLoader].getURLs.
+ filter(_.getProtocol == "file").map(u => new File(u.toURI).getPath).toList
// if there's just one thing in the classpath, and it's a jar, assume an executable jar.
currentClassPath ::: (if (currentClassPath.size == 1 && currentClassPath(0).endsWith(".jar")) {