@@ -278,10 +278,11 @@ object SparkEnv extends Logging {
278278 addedJars : Seq [String ],
279279 addedFiles : Seq [String ]): Map [String , Seq [(String , String )]] = {
280280
281+ import Properties ._
281282 val jvmInformation = Seq (
282- (" Java Version" , " %s (%s) " .format( Properties . javaVersion, Properties . javaVendor)),
283- (" Java Home" , Properties . javaHome),
284- (" Scala Version" , Properties . versionString)
283+ (" Java Version" , s " $ javaVersion ( $ javaVendor) " ),
284+ (" Java Home" , javaHome),
285+ (" Scala Version" , versionString)
285286 ).sorted
286287
287288 // Spark properties
@@ -296,18 +297,15 @@ object SparkEnv extends Logging {
296297
297298 // System properties that are not java classpaths
298299 val systemProperties = System .getProperties.iterator.toSeq
299- val otherProperties = systemProperties.filter { case (k, v ) =>
300+ val otherProperties = systemProperties.filter { case (k, _ ) =>
300301 k != " java.class.path" && ! k.startsWith(" spark." )
301302 }.sorted
302303
303304 // Class paths including all added jars and files
304- val classPathProperty = systemProperties.find { case (k, v) =>
305- k == " java.class.path"
306- }.getOrElse((" " , " " ))
307- val classPathEntries = classPathProperty._2
305+ val classPathEntries = javaClassPath
308306 .split(File .pathSeparator)
309- .filterNot(e => e .isEmpty)
310- .map(e => (e , " System Classpath" ))
307+ .filterNot(_ .isEmpty)
308+ .map((_ , " System Classpath" ))
311309 val addedJarsAndFiles = (addedJars ++ addedFiles).map((_, " Added By User" ))
312310 val classPaths = (addedJarsAndFiles ++ classPathEntries).sorted
313311
0 commit comments