You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2016/09/06 14:22:13 UTC
cxf git commit: CXF-6604 - Only import a Node if we absolutely have to
Repository: cxf
Updated Branches:
refs/heads/master 203b5433b -> e2c866a5c
CXF-6604 - Only import a Node if we absolutely have to
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e2c866a5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e2c866a5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e2c866a5
Branch: refs/heads/master
Commit: e2c866a5cf89436f6453f686d0b703fde716aeb5
Parents: 203b543
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Sep 6 15:20:58 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Sep 6 15:22:01 2016 +0100
----------------------------------------------------------------------
.../security/wss4j/policyhandlers/AbstractBindingBuilder.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/e2c866a5/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 335f1ef..6247016 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -608,7 +608,10 @@ public abstract class AbstractBindingBuilder extends AbstractCommonBindingHandle
}
protected Element cloneElement(Element el) {
- return (Element)secHeader.getSecurityHeader().getOwnerDocument().importNode(el, true);
+ if (!secHeader.getSecurityHeader().getOwnerDocument().equals(el.getOwnerDocument())) {
+ return (Element)secHeader.getSecurityHeader().getOwnerDocument().importNode(el, true);
+ }
+ return el;
}
protected void addSignatureParts(List<SupportingToken> tokenList, List<WSEncryptionPart> sigParts) {