[
https://issues.apache.org/jira/browse/TUSCANY-958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kelvin Goodson updated TUSCANY-958:
-----------------------------------
Fix Version/s: Java-SDO-M3
> NPE generated during a property set of a static SDO
> ---------------------------------------------------
>
> Key: TUSCANY-958
> URL: https://issues.apache.org/jira/browse/TUSCANY-958
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Affects Versions: Java-SCA-Mx
> Environment: N/A
> Reporter: David T. Adcox
> Fix For: Java-SDO-M3
>
> Attachments: tuscany958.diff
>
>
> When a property is set on a static SDO object, a Null Pointer Exception is
> thrown. This will only occur if the property is being set for the second
> time, the initial set of the property works. The problem is caused by some
> erroneous code in the DataObjectImpl class.
> In the inverseAdd(Object,int,ChangeContext) method, the local variable,
> changeContextImpl is retrieved from a local method
> initializeChangeContext(ChangeContext). Then, immediately following this
> line of code, the same variable is set again by way of a cast of a parameter
> to the method. In some instances, the value being passed is null, so when
> the value is used later, an NPE will occur. It seems the cast-set is
> possibly an old remnant of code from before the creation of the
> InitializeChangeContext method. This method properly handles the creation of
> the ChangeContext and works fine, we simply need to comment out the cast-set
> line of code.
> A similar behavior is found in inverseRemove(Object,Object,int,Class,
> ChangeContext), so it should be fixed, as well.
--
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]