|
Re: [CDO] CDORevisionImpl.eIsSet() works incorrectly [message #426091 is a reply to message #426085] |
Tue, 16 December 2008 09:45 |
|
Saulius,
It looks like a bug. More generally it seems that we should check
against the default value rather than against null.
Can you please file a bugzilla?
Cheers
/Eike
----
http://thegordian.blogspot.com
Saulius Tvarijonas schrieb:
> Hi,
>
> I am using CDO 2.0.0M3 build. I am using EObject.eIsSet() to check if
> certain feature is set. It seems CDOObject always returns true, even
> if there is no value set.
> Debugging shows that eIsSet goes to CDORevisionImpl.eIsSet().
> Implementation is:
>
> public boolean isSet(CDOFeature feature)
> {
> return getValue(feature) != null;
> }
>
> It seems checking here is incorrect, because value is CDOIDNULLImpl
> instance. If I use eGet() method, I get as expected null.
>
> Is it normal behavior?
>
> Regards,
> Saulius
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] CDORevisionImpl.eIsSet() works incorrectly [message #426105 is a reply to message #426091] |
Tue, 16 December 2008 14:23 |
Saulius Tvarijonas Messages: 34 Registered: July 2009 |
Member |
|
|
Hi,
I registered bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=258933
Regards,
Saulius
On 12/16/2008 11:45 AM, Eike Stepper wrote:
> Saulius,
>
> It looks like a bug. More generally it seems that we should check
> against the default value rather than against null.
> Can you please file a bugzilla?
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> Saulius Tvarijonas schrieb:
>> Hi,
>>
>> I am using CDO 2.0.0M3 build. I am using EObject.eIsSet() to check if
>> certain feature is set. It seems CDOObject always returns true, even
>> if there is no value set.
>> Debugging shows that eIsSet goes to CDORevisionImpl.eIsSet().
>> Implementation is:
>>
>> public boolean isSet(CDOFeature feature)
>> {
>> return getValue(feature) != null;
>> }
>>
>> It seems checking here is incorrect, because value is CDOIDNULLImpl
>> instance. If I use eGet() method, I get as expected null.
>>
>> Is it normal behavior?
>>
>> Regards,
>> Saulius
|
|
|
Powered by
FUDForum. Page generated in 0.02821 seconds