You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tedyu <gi...@git.apache.org> on 2015/09/16 18:30:58 UTC

[GitHub] flink pull request: FLINK-2595 Unclosed JarFile may leak resource ...

GitHub user tedyu opened a pull request:

    https://github.com/apache/flink/pull/1137

    FLINK-2595 Unclosed JarFile may leak resource in ClassLoaderUtilsTest

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tedyu/flink master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1137.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1137
    
----
commit 705fa05121a6a2732e2604148653705a419f4d60
Author: Ted <yu...@gmail.com>
Date:   2015-09-16T16:29:54Z

    FLINK-2595 Unclosed JarFile may leak resource in ClassLoaderUtilsTest

----


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

[GitHub] flink pull request: FLINK-2595 Unclosed JarFile may leak resource ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/1137


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

[GitHub] flink pull request: FLINK-2595 Unclosed JarFile may leak resource ...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1137#discussion_r39676482
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/util/ClassLoaderUtilsTest.java ---
    @@ -46,13 +46,16 @@ public void testWithURLClassLoader() {
     			jarFileCreator.createJarFile();
     			
     			// validate that the JAR is correct and the test setup is not broken
    +			JarFile jarFile = null;
     			try {
    -				new JarFile(validJar.getAbsolutePath());
    +				jarFile = new JarFile(validJar.getAbsolutePath());
     			}
     			catch (Exception e) {
     				e.printStackTrace();
     				fail("test setup broken: cannot create a valid jar file");
    -			}
    +			} finally {
    +                                if (jarFile != null) jarFile.close();
    --- End diff --
    
    We use tabs for indention in Java code. Can you fix this and the next line?


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

[GitHub] flink pull request: FLINK-2595 Unclosed JarFile may leak resource ...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1137#issuecomment-140868278
  
    Hi @tedyu,
    Thanks for the pull request!
    It's good to merge after the the indention is fixed.


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

[GitHub] flink pull request: FLINK-2595 Unclosed JarFile may leak resource ...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1137#issuecomment-141006345
  
    Thanks for the update.
    Will merge this now.


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