cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] cxf git commit: CXF-6604 - Only import a Node if we absolutely have to
Date Tue, 06 Sep 2016 14:22:49 GMT
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/88b381d8
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/88b381d8
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/88b381d8

Branch: refs/heads/3.0.x-fixes
Commit: 88b381d8027360b1f1bb85cee376c71cdea2fcf2
Parents: 595c43e
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:42 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/88b381d8/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 ab2aa94..d75f3d4 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
@@ -602,7 +602,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,


Mime
View raw message