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:31 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 267dc2107 -> 79fb59268


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/79fb5926
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/79fb5926
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/79fb5926

Branch: refs/heads/3.1.x-fixes
Commit: 79fb59268605c1e2dfc64e4d5dd8d4a91108537e
Parents: 267dc21
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:24 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/79fb5926/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