Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313048 - [ast] OCLExpression.name can be incorrectly cached
Summary: [ast] OCLExpression.name can be incorrectly cached
Status: NEW
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard: Release Currency, Legacy
Keywords:
Depends on:
Blocks: 318379
  Show dependency tree
 
Reported: 2010-05-16 17:33 EDT by Ed Willink CLA
Modified: 2011-11-08 11:52 EST (History)
0 users

See Also:
ed: indigo-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2010-05-16 17:33:05 EDT
As reported in the EMF newgroup "EAnnotations and their contents" thread, the name of for instance a Collection can be computed prematurely by ill-advised user code, causing a problem when the name is set later in the load process.

As observed by Ed Merks, the cached value does not track its algorithmic source.

----

Specification-wise, OclExpression::name is a mess, caused by the dubious inheritance of OclExpression from TypedElement. What is the name of "1 + 2"? unspecified. The name "Set(XX)" is inadequate because there may be multiple XXs (a known OCL issue) but specigfied as derived. The name in x->forAll( is of course a normal name.

----

MDT/OCL is stuck with the OMG specification, but should at least cache the name in a way that does not violate EMF behaviours.