Problem with Property Redefinition and Subsetting [message #626562] |
Wed, 14 May 2008 17:48 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
I have redefined properties, thus:
class A
- property u1 [0..1] {derived union}
class B -> A
- property p1 [1] {subsets u1}
class C -> B
- property p2 [1] {redefines p1}
If, given an instance 'c' of C, I to
c.setP2(somevalue)
and subsequently do
c.getU1()
I get a null result. If, instead, I had first done
c.setP1(somevalue)
I would have got the expected result from the getU1() call.
The reason why this is happening is that the implementation of getU1()
is in the BImpl class; C does not override it. getU1() checks whether
p1 is set (eIsSet method), which does not consider the fact that it may
be implicitly set by p2 having been set.
Does this sound right?
I am using UML2 2.1.1 release.
|
|
|
Powered by
FUDForum. Page generated in 0.02529 seconds