Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E8ACD10A24 for ; Wed, 11 Sep 2013 09:38:32 +0000 (UTC) Received: (qmail 45464 invoked by uid 500); 11 Sep 2013 09:38:31 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 42180 invoked by uid 500); 11 Sep 2013 09:38:25 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 42143 invoked by uid 99); 11 Sep 2013 09:38:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Sep 2013 09:38:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2F16F8BD840; Wed, 11 Sep 2013 09:38:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@camel.apache.org Date: Wed, 11 Sep 2013 09:38:26 -0000 Message-Id: <62a6efe3c01f47cab38f6b1fdbe52ad3@git.apache.org> In-Reply-To: <14371baa82154f32ba7821ad52a8bb26@git.apache.org> References: <14371baa82154f32ba7821ad52a8bb26@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: CAMEL-6727 Close the stream in XmlSignerHelper.getXslTransform with thanks to Franz CAMEL-6727 Close the stream in XmlSignerHelper.getXslTransform with thanks to Franz Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/812524a6 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/812524a6 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/812524a6 Branch: refs/heads/camel-2.12.x Commit: 812524a64980100e819f2aa4fb3f30bef0e138db Parents: c04e88e Author: Willem Jiang Authored: Wed Sep 11 17:04:06 2013 +0800 Committer: Willem Jiang Committed: Wed Sep 11 17:37:00 2013 +0800 ---------------------------------------------------------------------- .../camel/component/xmlsecurity/api/XmlSignatureHelper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/812524a6/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java ---------------------------------------------------------------------- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java index 575f82b..851aeb5 100644 --- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/api/XmlSignatureHelper.java @@ -52,6 +52,7 @@ import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; +import org.apache.camel.util.IOHelper; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -330,7 +331,11 @@ public final class XmlSignatureHelper { if (is == null) { throw new IllegalStateException(String.format("XSL file %s not found", path)); } - return getXslTranform(is); + try{ + return getXslTranform(is); + }finally{ + IOHelper.close(is); + } } /**