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

    https://github.com/apache/spark/pull/18971#discussion_r135382209
  
    --- Diff: 
core/src/test/scala/org/apache/spark/deploy/RPackageUtilsSuite.scala ---
    @@ -137,9 +137,10 @@ class RPackageUtilsSuite
         IvyTestUtils.withRepository(main, None, None) { repo =>
           val jar = IvyTestUtils.packJar(new File(new URI(repo)), dep1, Nil,
             useIvyLayout = false, withR = false, None)
    -      val jarFile = new JarFile(jar)
    -      assert(jarFile.getManifest == null, "jar file should have null 
manifest")
    -      assert(!RPackageUtils.checkManifestForR(jarFile), "null manifest 
should return false")
    +      Utils.tryWithResource(new JarFile(jar)) { jarFile =>
    +        assert(jarFile.getManifest == null, "jar file should have null 
manifest")
    +        assert(!RPackageUtils.checkManifestForR(jarFile), "null manifest 
should return false")
    +      }
    --- End diff --
    
    Simply closes `JarFile`. This should be closed


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