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

    https://github.com/apache/spark/pull/18040#discussion_r117625248
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/IvyTestUtils.scala ---
    @@ -243,16 +243,18 @@ private[deploy] object IvyTestUtils {
           withManifest: Option[Manifest] = None): File = {
         val jarFile = new File(dir, artifactName(artifact, useIvyLayout))
         val jarFileStream = new FileOutputStream(jarFile)
    -    val manifest = withManifest.getOrElse {
    -      val mani = new Manifest()
    +    val manifest: Manifest = withManifest.getOrElse {
           if (withR) {
    +        val mani = new Manifest()
             val attr = mani.getMainAttributes
             attr.put(Name.MANIFEST_VERSION, "1.0")
             attr.put(new Name("Spark-HasRPackage"), "true")
    -      }
    -      mani
    +        mani
    +      } else null
         }
    -    val jarStream = new JarOutputStream(jarFileStream, manifest)
    +    val jarStream = if (manifest != null) {
    +      new JarOutputStream(jarFileStream, manifest)
    +    } else new JarOutputStream(jarFileStream)
    --- End diff --
    
    ditto here with `else`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to