cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] cxf git commit: [CXF-7392] Optimize RM fault encoding to not bounce through DOM, avoids needing transformer as well
Date Thu, 08 Jun 2017 15:29:08 GMT
[CXF-7392] Optimize RM fault encoding to not bounce through DOM, avoids needing transformer
as well


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4fb07119
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4fb07119
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4fb07119

Branch: refs/heads/master
Commit: 4fb071197127482933e43ad92ec6d979520f3844
Parents: 7054ae6
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Jun 8 07:57:21 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Jun 8 11:28:25 2017 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/ws/rm/EncoderDecoder10AImpl.java  | 11 +++--------
 .../org/apache/cxf/ws/rm/EncoderDecoder10Impl.java   | 11 +++--------
 .../org/apache/cxf/ws/rm/EncoderDecoder11Impl.java   | 15 ++-------------
 .../cxf/systest/ws/rm/WSRM12ServerCycleTest.java     |  1 -
 4 files changed, 8 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4fb07119/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10AImpl.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10AImpl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10AImpl.java
index ccd362e..084e9db 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10AImpl.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10AImpl.java
@@ -137,19 +137,14 @@ public final class EncoderDecoder10AImpl extends EncoderDecoder {
             new org.apache.cxf.ws.rm.v200502wsa15.SequenceFaultType();
         flt.setFaultCode(sf.getFaultCode());
         Object detail = sf.getDetail();
-        Document doc = DOMUtils.createDocument();
         if (detail instanceof Element) {
             flt.getAny().add(detail);
         } else if (detail instanceof Identifier) {
-            marshaller.marshal(VersionTransformer.convert200502wsa15((Identifier)detail),
doc);
+            flt.getAny().add(VersionTransformer.convert200502wsa15((Identifier)detail));
         } else if (detail instanceof SequenceAcknowledgement) {
-            marshaller.marshal(VersionTransformer.convert200502wsa15((SequenceAcknowledgement)detail),
doc);
-        }
-        Element data = doc.getDocumentElement();
-        if (data != null) {
-            flt.getAny().add(data);
+            flt.getAny().add(VersionTransformer.convert200502wsa15((SequenceAcknowledgement)detail));
         }
-        data = sf.getExtraDetail();
+        Element data = sf.getExtraDetail();
         if (data != null) {
             flt.getAny().add(data);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4fb07119/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10Impl.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10Impl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10Impl.java
index d203e1a..35ec94c 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10Impl.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder10Impl.java
@@ -135,19 +135,14 @@ public final class EncoderDecoder10Impl extends EncoderDecoder {
         org.apache.cxf.ws.rm.v200502.SequenceFaultType flt = new org.apache.cxf.ws.rm.v200502.SequenceFaultType();
         flt.setFaultCode(sf.getFaultCode());
         Object detail = sf.getDetail();
-        Document doc = DOMUtils.createDocument();
         if (detail instanceof Element) {
             flt.getAny().add(detail);
         } else if (detail instanceof Identifier) {
-            marshaller.marshal(VersionTransformer.convert200502((Identifier)detail), doc);
+            flt.getAny().add(VersionTransformer.convert200502((Identifier)detail));
         } else if (detail instanceof SequenceAcknowledgement) {
-            marshaller.marshal(VersionTransformer.convert200502((SequenceAcknowledgement)detail),
doc);
-        }
-        Element data = doc.getDocumentElement();
-        if (data != null) {
-            flt.getAny().add(data);
+            flt.getAny().add(VersionTransformer.convert200502((SequenceAcknowledgement)detail));
         }
-        data = sf.getExtraDetail();
+        Element data = sf.getExtraDetail();
         if (data != null) {
             flt.getAny().add(data);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4fb07119/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder11Impl.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder11Impl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder11Impl.java
index 77f5f36..72153ad 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder11Impl.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/EncoderDecoder11Impl.java
@@ -133,19 +133,8 @@ public final class EncoderDecoder11Impl extends EncoderDecoder {
         SequenceFaultType flt = new SequenceFaultType();
         flt.setFaultCode(sf.getFaultCode());
         Object detail = sf.getDetail();
-        Document doc = DOMUtils.createDocument();
-        if (detail instanceof Element) {
-            flt.getAny().add(detail);
-        } else if (detail instanceof Identifier) {
-            marshaller.marshal(detail, doc);
-        } else if (detail instanceof SequenceAcknowledgement) {
-            marshaller.marshal(detail, doc);
-        }
-        Element data = doc.getDocumentElement();
-        if (data != null) {
-            addDetail(flt, data);
-        }
-        data = sf.getExtraDetail();
+        flt.getAny().add(detail);
+        Element data = sf.getExtraDetail();
         if (data != null) {
             addDetail(flt, data);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4fb07119/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
index de471b7..72bdcfa 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/WSRM12ServerCycleTest.java
@@ -146,7 +146,6 @@ public class WSRM12ServerCycleTest extends AbstractBusClientServerTestBase
{
     }
 
     @Test
-    @org.junit.Ignore 
     public void testNonPersistentSequenceNoTransformer() throws Exception {
         try {
             //CXF-7392


Mime
View raw message