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 "Brian McDonald (JIRA)" <ax...@ws.apache.org> on 2007/02/13 00:15:06 UTC

[jira] Created: (AXIS-2628) NullPointerException at BeanDeserializer.java:304

NullPointerException at BeanDeserializer.java:304
-------------------------------------------------

                 Key: AXIS-2628
                 URL: https://issues.apache.org/jira/browse/AXIS-2628
             Project: Axis
          Issue Type: Bug
          Components: Serialization/Deserialization
    Affects Versions: 1.4
            Reporter: Brian McDonald


Caused by: java.lang.NullPointerException at
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:304)


The if block doesn't protect against the dSer variable from being null which will cause a NPE when it tries to call dSer.registerValueTarget:

                if (!((dSer != null) && (dSer instanceof ArrayDeserializer))) {
                    collectionIndex++;
                    dSer.registerValueTarget(new BeanPropertyTarget(value,
                            propDesc, collectionIndex));


I think the if block should be changed to:


                if ( dSer != null && !(dSer instanceof ArrayDeserializer)) {


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org