From 75a3b88c697d485a321429a7526c823f1b4bfc8e Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Thu, 9 May 2013 14:04:14 +0200 Subject: replaces inferBootClasspath with a simple lookup at sun.boot.class.path It's not like we're achieving any generality by iterating through all keys in System.getProperties and looking for ones which resemble "boot.class.path", so let's be simpler. --- src/reflect/scala/reflect/runtime/ReflectionUtils.scala | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src') diff --git a/src/reflect/scala/reflect/runtime/ReflectionUtils.scala b/src/reflect/scala/reflect/runtime/ReflectionUtils.scala index 2685085326..3ee53eb7a1 100644 --- a/src/reflect/scala/reflect/runtime/ReflectionUtils.scala +++ b/src/reflect/scala/reflect/runtime/ReflectionUtils.scala @@ -28,17 +28,6 @@ private[scala] object ReflectionUtils { case ex if pf isDefinedAt unwrapThrowable(ex) => pf(unwrapThrowable(ex)) } - private def systemProperties: Map[String, String] = { - import scala.collection.JavaConverters._ - // cannot use System.getProperties.asScala because of SI-7465 - val javaProperties: java.util.Dictionary[Object, Object] = System.getProperties - javaProperties.asScala.collect{ case (k: String, v: String) => (k, v) }.toMap - } - - private def inferBootClasspath: String = ( - systemProperties find (_._1 endsWith ".boot.class.path") map (_._2) getOrElse "" - ) - def show(cl: ClassLoader): String = { import scala.language.reflectiveCalls @@ -53,7 +42,7 @@ private[scala] object ReflectionUtils { case cl if cl != null && isAbstractFileClassLoader(cl.getClass) => cl.asInstanceOf[{val root: scala.reflect.io.AbstractFile}].root.canonicalPath case null => - inferBootClasspath + scala.util.Properties.propOrEmpty("sun.boot.class.path") case _ => "" } -- cgit v1.2.3