cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jp...@apache.org
Subject cxf git commit: CXF-6242 reverted the change so that CXF-1194 mtom data writer handling still works with an custom event handler
Date Sat, 07 Feb 2015 09:43:22 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 596988d73 -> 9e20a49c6


CXF-6242 reverted the change so that  CXF-1194 mtom data writer handling still works with
an custom event handler


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

Branch: refs/heads/3.0.x-fixes
Commit: 9e20a49c680be857e5425aff03093fc8353cc2d8
Parents: 596988d
Author: Jason Pell <jpell@apache.org>
Authored: Sat Feb 7 19:15:33 2015 +1100
Committer: Jason Pell <jpell@apache.org>
Committed: Sat Feb 7 19:16:01 2015 +1100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxb/io/DataReaderImpl.java |  1 +
 .../java/org/apache/cxf/jaxb/io/DataWriterImpl.java | 16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9e20a49c/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
index f9deb66..de13029 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
@@ -73,6 +73,7 @@ public class DataReaderImpl<T> extends JAXBDataBase implements DataReader<T>
{
             if (origHandler != null && origHandler.handleEvent(event)) {
                 return true;
             } else {
+                // hack for CXF-3453
                 String msg = event.getMessage();
                 return msg != null 
                     && msg.contains(":Id") 

http://git-wip-us.apache.org/repos/asf/cxf/blob/9e20a49c/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
index de9e195..0c26166 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
@@ -97,15 +97,17 @@ public class DataWriterImpl<T> extends JAXBDataBase implements DataWriter<T>
{
         }
         
         public boolean handleEvent(ValidationEvent event) {
-            // if the original handler has already handled the event, no need for us
-            // to do anything, otherwise if not yet handled, then do this 'hack'
-            if (origHandler != null && origHandler.handleEvent(event)) {
+            // CXF-1194 this hack is specific to MTOM, so pretty safe to leave in here before
calling the origHandler.
+            String msg = event.getMessage();
+            if (msg.startsWith("cvc-type.3.1.2: ")
+                && msg.contains(marshaller.getLastMTOMElementName().getLocalPart()))
{
                 return true;
-            } else {
-                String msg = event.getMessage();
-                return msg.startsWith("cvc-type.3.1.2: ")
-                    && msg.contains(marshaller.getLastMTOMElementName().getLocalPart());
             }
+            
+            if (origHandler != null) {
+                return origHandler.handleEvent(event);
+            }
+            return false;
         }
         
     }


Mime
View raw message