[CDO] CDORevisionImpl.eIsSet() works incorrectly [message #426085] |
Tue, 16 December 2008 03:37  |
Eclipse User |
|
|
|
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
|
|
|
|
Re: [CDO] CDORevisionImpl.eIsSet() works incorrectly [message #426105 is a reply to message #426091] |
Tue, 16 December 2008 09:23  |
Eclipse User |
|
|
|
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.06291 seconds