You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "David T. Adcox (JIRA)" <tu...@ws.apache.org> on 2006/12/02 00:42:23 UTC

[jira] Updated: (TUSCANY-958) NPE generated during a property set of a static SDO

     [ http://issues.apache.org/jira/browse/TUSCANY-958?page=all ]

David T. Adcox updated TUSCANY-958:
-----------------------------------

    Attachment: tuscany958.diff

I'm attaching the diff file that fixes this issue.

> NPE generated during a property set of a static SDO
> ---------------------------------------------------
>
>                 Key: TUSCANY-958
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-958
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>         Environment: N/A
>            Reporter: David T. Adcox
>         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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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