Skip to content

Commit

Permalink
Avoid scala.sys.process.javaVmArguments
Browse files Browse the repository at this point in the history
See scala#6164
Ref scala/scala-dev#461 (still need to release partest & upgrade)
  • Loading branch information
dwijnand authored and lrytz committed May 9, 2018
1 parent 54c8731 commit 734b2a2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/partest/scala/tools/partest/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package scala.tools

import java.util.concurrent.{ Callable, ExecutorService }
import scala.concurrent.duration.Duration
import scala.sys.process.javaVmArguments
import scala.tools.nsc.util.Exceptional

package object partest {
Expand Down Expand Up @@ -170,11 +169,16 @@ package object partest {
"%02d:%02d:%02d".format(elapsedHrs, dispMins, dispSecs)
}

def vmArgString = javaVmArguments.mkString(
"Java VM started with arguments: '",
" ",
"'"
)
def vmArgString = {
import scala.collection.JavaConverters._
val javaVmArguments =
java.lang.management.ManagementFactory.getRuntimeMXBean.getInputArguments.asScala.toList
javaVmArguments.mkString(
"Java VM started with arguments: '",
" ",
"'"
)
}

def allPropertiesString = {
import scala.collection.JavaConverters._
Expand Down

0 comments on commit 734b2a2

Please sign in to comment.