changeset 1073:fd7425c74b22

7901230: org.openjdk.jmh.util.Version leaks the InputStream
author shade
date Thu, 25 Dec 2014 17:16:33 +0300
parents 21d5793de4c0
children c486d1241cc1
files jmh-core/src/main/java/org/openjdk/jmh/util/Version.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/Version.java	Mon Dec 22 19:27:38 2014 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/Version.java	Thu Dec 25 17:16:33 2014 +0300
@@ -51,6 +51,8 @@
         } catch (IOException e) {
             pw.println("# Cannot figure out JMH version");
             return;
+        } finally {
+            FileUtils.safelyClose(s);
         }
 
         String version = (String) p.get("jmh.version");