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 06:17:28 UTC

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

[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/d34f8ccf
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/d34f8ccf
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/d34f8ccf

Branch: refs/heads/master
Commit: d34f8ccf598381f88249e4b75ba5bd5a2f4becca
Parents: 63f353f
Author: zentol <ch...@apache.org>
Authored: Wed Jul 11 18:19:53 2018 +0200
Committer: zentol <ch...@apache.org>
Committed: Fri Jul 13 06:11:54 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/d34f8ccf/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 7848478..c3e2336 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
@@ -103,8 +103,7 @@ public class JarListHandler extends AbstractRestHandler<RestfulGateway, EmptyReq
 
 					List<JarListInfo.JarEntryInfo> jarEntryList = new ArrayList<>();
 					String[] classes = new String[0];
-					try {
-						JarFile jar = new JarFile(f);
+					try (JarFile jar = new JarFile(f)) {
 						Manifest manifest = jar.getManifest();
 						String assemblerClass = null;