You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/07/13 07:23:47 UTC

flink git commit: [FLINK-9810][rest] Close jar file in JarListHandler

Repository: flink
Updated Branches:
  refs/heads/release-1.4 27a39de0f -> ecdd6baeb


[FLINK-9810][rest] Close jar file in JarListHandler

This closes #6310.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/ecdd6bae
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/ecdd6bae
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/ecdd6bae

Branch: refs/heads/release-1.4
Commit: ecdd6baeb56681e4bd038291adbb89bd92f14a2e
Parents: 27a39de
Author: zentol <ch...@apache.org>
Authored: Wed Jul 11 18:19:53 2018 +0200
Committer: zentol <ch...@apache.org>
Committed: Fri Jul 13 09:23:18 2018 +0200

----------------------------------------------------------------------
 .../apache/flink/runtime/webmonitor/handlers/JarListHandler.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ecdd6bae/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarListHandler.java
----------------------------------------------------------------------
diff --git a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarListHandler.java b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarListHandler.java
index 2b56ecd..66cc7f5 100644
--- a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarListHandler.java
+++ b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarListHandler.java
@@ -111,8 +111,7 @@ public class JarListHandler extends AbstractJsonRequestHandler {
 						gen.writeArrayFieldStart("entry");
 
 						String[] classes = new String[0];
-						try {
-							JarFile jar = new JarFile(f);
+						try (JarFile jar = new JarFile(f)) {
 							Manifest manifest = jar.getManifest();
 							String assemblerClass = null;