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 08:15:42 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 835761049 -> 864c3e292


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

Branch: refs/heads/2.7.x-fixes
Commit: 864c3e2927bd4d0d46ffdbd7a97abc105d2ccd2f
Parents: 8357610
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:15:33 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/864c3e29/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 8674a41..8b83fda 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
@@ -72,6 +72,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/864c3e29/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 51a50ec..b2a85fe 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
@@ -92,15 +92,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