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

Andy Grove commented on TUSCANY-1397:
-------------------------------------

We discussed this issue in last week's SDO spec. call and decided that for now 
(SDO 2.1.1) we will leave this behaviour unspecified but there seemed to be 
general concensus that the correct behaviour (to be clarified for SDO 3.0) 
would be to on-demand create the property for consistency with other set() 
methods. 



> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to