You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Caroline Maynard (JIRA)" <tu...@ws.apache.org> on 2007/08/01 16:13:53 UTC

[jira] Commented: (TUSCANY-1397) createDataObject() throws NPE if property does not exist

    [ https://issues.apache.org/jira/browse/TUSCANY-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516978 ] 

Caroline Maynard commented on TUSCANY-1397:
-------------------------------------------

The current SDO C++ implementation does create the property on demand, and does not throw an exception. The PHP SDO implementation makes use of this behaviour. Of course it would be a SMOP to change the PHP code to use an alternative mechanism ... but what alternative mechanism exists in the spec? 

> createDataObject() throws NPE if property does not exist
> --------------------------------------------------------
>
>                 Key: TUSCANY-1397
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1397
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>            Reporter: Andy Grove
>
> Calling createDataObject( "foo" ) where the data object's type does not define a property "foo" causes a null pointer exception in DataObjectUtil.createDataObject(DataObject dataObject, Property property, Type type) because it attempts to call property.isContainment without checking if the property is null.
> Calling createDataObject( "foo" ) on an open type should create an on-demand property. If the type is not open and the property does not exist then an exception should be thrown.
> Thanks,
> Andy.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org