Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] CDORevisionData.NIL in revision deltas - not supported?
[CDO] CDORevisionData.NIL in revision deltas - not supported? [message #1036840] Mon, 08 April 2013 22:15 Go to next message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1170
Registered: July 2009
Location: Canada
Senior Member

Hi, Eike,

In investigation of problems in handling explicit null values of
unsettable attributes, it appears to me that CDORevisionData.NIL cannot
be transmitted to the server as the new value in a

Running the test case contributed in this attachment:

on this bug:

also used by this follow-up bug:

I see that the reason why the test fails is that the revision delta
created as a result of the CDOLegacyAdapter::notifySet(...) method
pushing the "new value" of an unsettable feature into the CDOStore has
a Java null as the new value instead of CDORevisionData.NIL.

When the revision for a new object has a CDORevisionData.NIL value for
some attribute, there is no problem sending it to the server. Another
client reading this revision from the server gets the NIL value and
correctly translates it to an explicit null (is-set) value of the
unsettable feature.

But for objects that already exist, the client sends revision deltas
(containing feature deltas) to the server. In an attempt to fix
405191, I changed the legacy adapter to ensure that the new-value in
the feature delta is CDORevisionData.NIL when an unsettable feature is
changed to an explicit (is-set) null value. This results in a
ClassCastException (see trace, below) when writing the feature delta to
a CDODataOutputImpl delegates the the CDOTypeImpl.STRING to write the
value, but this tries to cast the NIL to a String.

Note that the same ClassCastException occurs when trying run the test
case from the above-linked attachment in a native (not legacy) test
configuration. It would seem that native models don't support
unsettable attributes of EString type at all.

So, the bottom line is: are unsettable attributes supposed to be
supported by CDO in attributes of EString type (and BooleanObject,
IntegerObject, FloatObject, etc.)? If so, I don't know how I can
safely update the communication protocol for revision deltas on the
client and server ends to support whatever backward/forward
compatibility of the protocol might be required.

I've pushed the test case (with changes to model6) to the bugs/405191
branch in Git, so it should be easy to check it out and run to see what
I mean.


Re: [CDO] CDORevisionData.NIL in revision deltas - not supported? [message #1037187 is a reply to message #1036840] Tue, 09 April 2013 09:02 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6380
Registered: July 2009
Senior Member
Comments are on ...


Previous Topic:Loading an encrypted emf resource
Next Topic:removing dyn. contributed items from a menu.
Goto Forum:

Current Time: Fri May 25 22:44:10 GMT 2018

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

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

Back to the top