You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/01/20 20:33:07 UTC

svn commit: r901344 - in /cxf/branches/2.2.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java

Author: dkulp
Date: Wed Jan 20 19:33:06 2010
New Revision: 901344

URL: http://svn.apache.org/viewvc?rev=901344&view=rev
Log:
Merged revisions 901336 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r901336 | dkulp | 2010-01-20 14:13:23 -0500 (Wed, 20 Jan 2010) | 2 lines
  
  [CXF-2627] Check the XmlElement name on the field of the wrapper class
  and warn if there is an issue instead of silently ignoring it.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=901344&r1=901343&r2=901344&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java (original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java Wed Jan 20 19:33:06 2010
@@ -898,10 +898,21 @@
                 // JAXB Type get XmlElement Annotation
                 XmlElement el = elField.getAnnotation(XmlElement.class);
                 if (el != null
-                    && partName.equals(el.name())) {
+                    && (partName.equals(el.name())
+                        || "##default".equals(el.name()))) {
                     elField.setAccessible(true);
                     fields.add(elField);
                 } else {
+                    if (getMethod == null && setMethod == null) {
+                        if (el != null) {
+                            LOG.warning("Could not create accessor for property " + partName 
+                                        + " of type " + wrapperType.getName() + " as the @XmlElement "
+                                        + "defines the name as " + el.name());
+                        } else {
+                            LOG.warning("Could not create accessor for property " + partName 
+                                        + " of type " + wrapperType.getName());
+                        }
+                    }
                     fields.add(null);
                 } 
             } else {