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

    https://github.com/apache/spark/pull/16305#discussion_r92761717
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/RPackageUtils.scala 
---
    @@ -176,26 +176,31 @@ private[deploy] object RPackageUtils extends Logging {
           val file = new File(Utils.resolveURI(jarPath))
           if (file.exists()) {
             val jar = new JarFile(file)
    -        if (checkManifestForR(jar)) {
    -          print(s"$file contains R source code. Now installing package.", 
printStream, Level.INFO)
    -          val rSource = extractRFolder(jar, printStream, verbose)
    -          if (RUtils.rPackages.isEmpty) {
    -            RUtils.rPackages = Some(Utils.createTempDir().getAbsolutePath)
    -          }
    -          try {
    -            if (!rPackageBuilder(rSource, printStream, verbose, 
RUtils.rPackages.get)) {
    -              print(s"ERROR: Failed to build R package in $file.", 
printStream)
    -              print(RJarDoc, printStream)
    +        Utils.tryWithSafeFinally {
    --- End diff --
    
    Actual change is as below:
    
    ```scala
    Utils.tryWithSafeFinally {
      ...
    } {
      jar.close()
    }
    ```


---
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