cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1546125 - in /cxf/trunk: rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Date Wed, 27 Nov 2013 17:28:49 GMT
Author: dkulp
Date: Wed Nov 27 17:28:49 2013
New Revision: 1546125

URL: http://svn.apache.org/r1546125
Log:
Don't set to "null" as that then creates a DefaultValidationEventHandler which prints things
out to System.out.

Modified:
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java?rev=1546125&r1=1546124&r2=1546125&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
Wed Nov 27 17:28:49 2013
@@ -127,7 +127,16 @@ public class DataWriterImpl<T> extends J
             marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE);
             marshaller.setListener(databinding.getMarshallerListener());
             if (setEventHandler) {
-                marshaller.setEventHandler(veventHandler);
+                ValidationEventHandler h = veventHandler;
+                if (veventHandler == null) {
+                    h = new ValidationEventHandler() {
+                        public boolean handleEvent(ValidationEvent event) {
+                            //continue on warnings only
+                            return event.getSeverity() == ValidationEvent.WARNING;
+                        }
+                    };
+                }
+                marshaller.setEventHandler(h);
             }
             
             final Map<String, String> nspref = databinding.getDeclaredNamespaceMappings();

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1546125&r1=1546124&r2=1546125&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Wed Nov 27 17:28:49 2013
@@ -633,7 +633,7 @@ public class ClientServerMiscTest extend
             port.modifyFoo(foo);
             fail("Expected exception not found");
         } catch (SOAPFaultException ex) {
-            assertTrue(ex.getMessage().contains("NoName is not a valid name"));
+            assertTrue(ex.getMessage(), ex.getMessage().contains("NoName is not a valid name"));
         }    
         try {
             Foo foo = new Foo();



Mime
View raw message