cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: CXF-6604 - Only import a Node if we absolutely have to
Date Tue, 06 Sep 2016 14:22:13 GMT
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 <coheigea@apache.org>
Authored: Tue Sep 6 15:20:58 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@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) {


Mime
View raw message