Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355184 - EObjectValidator does not support multiple inheritance validation
Summary: EObjectValidator does not support multiple inheritance validation
Status: RESOLVED WONTFIX
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 01:19 EDT by Ed Willink CLA
Modified: 2018-02-09 09:09 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-08-19 01:19:54 EDT
In

EObjectValidator.validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context)

the recursion (for non-EcorePackage) to superclass is via

                validate(eSuperTypes.get(0), eObject, diagnostics, context);

rather than a loop over all eSuperTypes, so constraints inherited from a second supertype are ignored.

Is this deliberate or an oversight? It's certainly a convenient way of avoiding double validation of a constraint
inherited from more than one superclass.
Comment 1 Ed Merks CLA 2018-02-09 09:09:29 EST
Yes this is deliberate limitation to avoid multiple .  It's similar to the limitation in 

org.eclipse.emf.ecore.impl.EFactoryImpl.create(EClass)

which can also only create an instance of one specific concrete class.