flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request: FLINK-2595 Unclosed JarFile may leak resource ...
Date Wed, 16 Sep 2015 19:51:24 GMT
Github user fhueske commented on a diff in the pull request:

    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/util/ClassLoaderUtilsTest.java
    @@ -46,13 +46,16 @@ public void testWithURLClassLoader() {
     			// 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) {
     				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.

View raw message