cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1546132 - in /cxf/branches/2.7.x-fixes: 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:34:31 GMT
Author: dkulp
Date: Wed Nov 27 17:34:30 2013
New Revision: 1546132

URL: http://svn.apache.org/r1546132
Log:
Merged revisions 1546125 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1546125 | dkulp | 2013-11-27 12:28:49 -0500 (Wed, 27 Nov 2013) | 2 lines

  Don't set to "null" as that then creates a DefaultValidationEventHandler which prints things
out to System.out.

........

Modified:
    cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
    cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java

Modified: cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java?rev=1546132&r1=1546131&r2=1546132&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
Wed Nov 27 17:34:30 2013
@@ -123,7 +123,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/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1546132&r1=1546131&r2=1546132&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Wed Nov 27 17:34:30 2013
@@ -632,7 +632,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