[spring-extensions] branch master updated: Close the input stream
Rod Widdowson
rdw at steadingsoftware.com
Thu Dec 31 12:06:58 EST 2015
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository spring-extensions.
The following commit(s) were added to refs/heads/master by this push:
new 383c57b Close the input stream
383c57b is described below
commit 383c57bf1596ecebdf52530d658eb36bc8658f48
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Dec 31 16:44:57 2015 +0000
Close the input stream
---
.../shibboleth/ext/spring/factory/EvaluableScriptFactoryBean.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/shibboleth/ext/spring/factory/EvaluableScriptFactoryBean.java b/src/main/java/net/shibboleth/ext/spring/factory/EvaluableScriptFactoryBean.java
index 3044ff8..9f67d36 100644
--- a/src/main/java/net/shibboleth/ext/spring/factory/EvaluableScriptFactoryBean.java
+++ b/src/main/java/net/shibboleth/ext/spring/factory/EvaluableScriptFactoryBean.java
@@ -17,6 +17,8 @@
package net.shibboleth.ext.spring.factory;
+import java.io.InputStream;
+
import net.shibboleth.utilities.java.support.primitive.StringSupport;
import net.shibboleth.utilities.java.support.scripting.EvaluableScript;
@@ -135,7 +137,9 @@ public class EvaluableScriptFactoryBean extends AbstractComponentAwareFactoryBea
}
if (null != resource) {
- script = StringSupport.inputStreamToString(resource.getInputStream(), null);
+ try (InputStream is = resource.getInputStream()) {
+ script = StringSupport.inputStreamToString(is, null);
+ }
}
log.debug("{} Script: {}", sourceId, script);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list