Community
Participate
Working Groups
Eike Stepper reports that a customer got an exception while evaluating allInstances on an abstract class and asked whether use on abstract classes was valid. The OCL specification specifies that allInstances returns instances of a classifier and its subtypes provide the number of instances is finite. A quick examination of the evaluation code suggests that it finds only exact type matches, and so potentially returns null provoking the reported exception when an empty collection was expected.
Just tried EModelElement.allInstances() on Ecore.ecore with both legacy and Xtext consoles. Both show lots of instances of the abstract class.
(In reply to comment #0) > Eike Stepper reports that a customer got an exception while evaluating > allInstances on an abstract class and asked whether use on abstract classes > was valid. Bug 400907 raised against CDO.
CLOSED after more than a year in RESOLVED state.
and CLOSE