You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2003/04/30 18:03:01 UTC

cvs commit: xml-axis/java/src/org/apache/axis/encoding/ser BeanSerializer.java

gdaniels    2003/04/30 09:03:01

  Modified:    java/src/org/apache/axis/encoding/ser BeanSerializer.java
  Log:
  Fix NPE in BeanSerializer.  The schema-writing
  code will handle missing XmlTypes (it'll use
  the default mapping for the JavaType), but this
  line of code didn't...
  
  Revision  Changes    Path
  1.66      +2 -2      xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java
  
  Index: BeanSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- BeanSerializer.java	22 Apr 2003 19:34:28 -0000	1.65
  +++ BeanSerializer.java	30 Apr 2003 16:03:00 -0000	1.66
  @@ -371,7 +371,7 @@
                   if (field != null) {
                       QName qname = field.getXmlName();
                       QName fieldXmlType = field.getXmlType();
  -                    boolean isAnonymous = fieldXmlType.getLocalPart().startsWith(">");
  +                    boolean isAnonymous = fieldXmlType != null && fieldXmlType.getLocalPart().startsWith(">");
   
                       if (qname != null) {
                           // FIXME!
  @@ -386,7 +386,7 @@
                           writeAttribute(types,
                                          propName,
                                          fieldType,
  -                                       field.getXmlType(),
  +                                       fieldXmlType,
                                          complexType);
                       } else {
                           writeField(types,