Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13272#discussion_r64679182
  
    --- Diff: project/SparkBuild.scala ---
    @@ -277,12 +277,24 @@ object SparkBuild extends PomBuild {
         // additional discussion and explanation.
         javacOptions in (Compile, compile) ++= Seq(
           "-target", javacJVMVersion.value
    -    ),
    +    ) ++ sys.env.get("JAVA_7_HOME").map { jdk7 =>
    +      if (javacJVMVersion.value == "1.7") {
    +        Seq("-bootclasspath", s"$jdk7/jre/lib/rt.jar")
    +      } else {
    +        Nil
    +      }
    +    }.getOrElse(Nil),
     
         scalacOptions in Compile ++= Seq(
           s"-target:jvm-${scalacJVMVersion.value}",
           "-sourcepath", (baseDirectory in ThisBuild).value.getAbsolutePath  
// Required for relative source links in scaladoc
    -    ),
    +    ) ++ sys.env.get("JAVA_7_HOME").map { jdk7 =>
    --- End diff --
    
    Can you use flatMap instead of needing getOrElse(Nil)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to