Repository: tomee
Updated Branches:
  refs/heads/master 41cb392c6 -> a13eebd65


TOMEE-1933 Fixes #40 closing stream for IO.slurp(File)


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

Branch: refs/heads/master
Commit: a13eebd657af204b1faf4cd0759b30b67295b5a7
Parents: 41cb392
Author: Romain manni-Bucau <rmannibu...@gmail.com>
Authored: Tue Sep 20 15:54:15 2016 +0200
Committer: Romain manni-Bucau <rmannibu...@gmail.com>
Committed: Tue Sep 20 15:54:15 2016 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/openejb/loader/IO.java              | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/a13eebd6/container/openejb-loader/src/main/java/org/apache/openejb/loader/IO.java
----------------------------------------------------------------------
diff --git 
a/container/openejb-loader/src/main/java/org/apache/openejb/loader/IO.java 
b/container/openejb-loader/src/main/java/org/apache/openejb/loader/IO.java
index 8d74c16..30e0769 100644
--- a/container/openejb-loader/src/main/java/org/apache/openejb/loader/IO.java
+++ b/container/openejb-loader/src/main/java/org/apache/openejb/loader/IO.java
@@ -153,7 +153,9 @@ public class IO {
     }
 
     public static String slurp(final File file) throws IOException {
-        return slurp(read(file));
+        try (final InputStream is = read(file)) {
+            return slurp(is);
+        }
     }
 
 

Reply via email to