Skip to content

Commit

Permalink
Address feedback on javadoc and putAll
Browse files Browse the repository at this point in the history
  • Loading branch information
jvican committed Apr 3, 2018
1 parent 2a5bcbf commit 704169e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/main/scala/bloop/exec/ForkProcess.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ final case class ForkProcess(javaEnv: JavaEnv, classpath: Array[AbsolutePath]) {
* @param className The fully qualified name of the class to run.
* @param args The arguments to pass to the main method.
* @param logger Where to log the messages from execution.
* @param properties The environment properties to run the program with.
* @param extraClasspath Paths to append to the classpath before running.
* @return 0 if the execution exited successfully, a non-zero number otherwise.
*/
Expand All @@ -49,6 +50,7 @@ final case class ForkProcess(javaEnv: JavaEnv, classpath: Array[AbsolutePath]) {
logger: Logger,
env: Properties,
extraClasspath: Array[AbsolutePath] = Array.empty): Int = {
import scala.collection.JavaConverters.{propertiesAsScalaMap, mapAsJavaMapConverter}
val fullClasspath = classpath ++ extraClasspath

val java = javaEnv.javaHome.resolve("bin").resolve("java")
Expand All @@ -71,7 +73,7 @@ final case class ForkProcess(javaEnv: JavaEnv, classpath: Array[AbsolutePath]) {
processBuilder.directory(cwd.toFile)
val processEnv = processBuilder.environment()
processEnv.clear()
env.forEach { case (k: String, v: String) => processEnv.put(k, v); () }
processEnv.putAll(propertiesAsScalaMap(env).asJava)
val process = processBuilder.start()
val processLogger = new ProcessLogger(logger, process)
processLogger.start()
Expand Down
1 change: 1 addition & 0 deletions frontend/src/main/scala/bloop/testing/TestInternals.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ object TestInternals {
* @param discoveredTests The tests that were discovered.
* @param eventHandler Handler that reacts on messages from the testing frameworks.
* @param logger Logger receiving test output.
* @param env The environment properties to run the program with.
*/
def executeTasks(cwd: AbsolutePath,
fork: ForkProcess,
Expand Down

0 comments on commit 704169e

Please sign in to comment.