cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1524087 - /cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Date Tue, 17 Sep 2013 15:03:43 GMT
Author: dkulp
Date: Tue Sep 17 15:03:43 2013
New Revision: 1524087

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

Modified:
    cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java

Modified: cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=1524087&r1=1524086&r2=1524087&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Tue Sep 17 15:03:43 2013
@@ -270,6 +270,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