[ https://issues.apache.org/jira/browse/TUSCANY-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Kurz updated TUSCANY-1681: -------------------------------- Attachment: 1681.patch Well, let me push the issue a bit by at least submitting a patch to return null from each of the transformers: XMLStreamReader2DataObject and DataObject2XMLStreamReader upon passing a null 'source' as input. I'm not sure if an alternative solution would be to, say, have DataObject2XMLStreamReader pass back a XMLStreamReader upon receiving a 'null' DataObject as input, in which case we could probably remove this change to XMLStreamReader2DataObject . And it's conceivable the SDO impl should be changed to handle passing a null SDO into XMLHelper.createDocument() and to pass back such a non-null XMLStreamReader in such a case. > DataObject2XMLStreamReader can't handle a null (or could this be an SDO bug??) > ------------------------------------------------------------------------------ > > Key: TUSCANY-1681 > URL: https://issues.apache.org/jira/browse/TUSCANY-1681 > Project: Tuscany > Issue Type: Bug > Components: Java SCA Data Binding Runtime > Reporter: Scott Kurz > Fix For: Java-SCA-Next > > Attachments: 1681.patch > > > When passing a null object into DataObject2XMLStreamReader I hit a NPE: > java.lang.NullPointerException > at > org.apache.tuscany.sdo.util.resource.DataObjectXMLStreamReader.populateProperties(DataObjectXMLStreamReader.java:277) > at > org.apache.tuscany.sdo.util.resource.DataObjectXMLStreamReader.<init>(DataObjectXMLStreamReader.java:116) > at > org.apache.tuscany.sdo.util.resource.DataObjectXMLStreamReader.<init>(DataObjectXMLStreamReader.java:104) > at > org.apache.tuscany.sdo.helper.XMLStreamHelperImpl.createXMLStreamReader(XMLStreamHelperImpl.java:80) > at > org.apache.tuscany.sca.databinding.sdo.DataObject2XMLStreamReader.transform(DataObject2XMLStreamReader.java:48) > at > org.apache.tuscany.sca.databinding.sdo.DataObject2XMLStreamReader.transform(DataObject2XMLStreamReader.java:37) > at > org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:77) > This is either: > * a bug in this specific transformer (my guess) > * a bug in SDO (I'm guessing not) > * a bug in the Tuscany databinding framework which should special case nulls > (I'd think we might want to let transforms decide on their own how to handle > null?) -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]