Skip to main content



      Home
Home » Modeling » EMF » [CDO] CDORevisionImpl.eIsSet() works incorrectly
[CDO] CDORevisionImpl.eIsSet() works incorrectly [message #426085] Tue, 16 December 2008 03:37 Go to next message
Eclipse UserFriend
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 #426091 is a reply to message #426085] Tue, 16 December 2008 04:45 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: [CDO] CDORevisionImpl.eIsSet() works incorrectly [message #426105 is a reply to message #426091] Tue, 16 December 2008 09:23 Go to previous message
Eclipse UserFriend
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
Previous Topic:Stateful vs Singleton
Next Topic:XML Validation
Goto Forum:
  


Current Time: Mon Jul 07 15:46:27 EDT 2025

Powered by FUDForum. Page generated in 0.06291 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top