cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1524108 - /cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Date Tue, 17 Sep 2013 16:01:09 GMT
Author: dkulp
Date: Tue Sep 17 16:01:08 2013
New Revision: 1524108

URL: http://svn.apache.org/r1524108
Log:
Fix tck failure due to double wrapping JAXBElements

Modified:
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=1524108&r1=1524107&r2=1524108&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Tue Sep 17 16:01:08 2013
@@ -271,6 +271,12 @@ public final class JAXBEncoderDecoder {
     }
     @SuppressWarnings({ "unchecked", "rawtypes" })
     private static JAXBElement<?> newJAXBElement(QName elName, Class<?> cls,
Object mObj) {
+        if (mObj instanceof JAXBElement) {
+            return (JAXBElement)mObj;
+        }
+        if (cls == null && mObj != null) {
+            cls = mObj.getClass();
+        }
         return new JAXBElement(elName, cls, mObj);
     }
 



Mime
View raw message