Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353773

Summary: [EMF Validation] bug in EValidatorAdapter.validate(EClass, EObject, DiagnosticChain, Map, Set)
Product: [Automotive] Sphinx Reporter: Lan Phan <quoclan>
Component: CoreAssignee: Stephan Eberle <stephaneberle9>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: idydieng, stephaneberle9
Version: 0.7.0Flags: idydieng: iplog-
Target Milestone: 0.7.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
EValidatorAdapter.patch
none
EValidatorAdapter.patch2 idydieng: iplog+

Description Lan Phan CLA 2011-08-03 10:33:45 EDT
Build Identifier: 

There are 2 cases in this method:
Case1: EditingDomain exists --> Runnable is created and run as following:
          1. status = batchValidator.validate()
          2. (eobject, status) is put into context
          3. status is appended into DiagnosticChain obj

Case2: No EditingDomain -->
          1. batchValidator.validate() is called directly

--> not consistent --> We should keep similarity of 2 cases by adding step 2 and 3 for case2.

Reproducible: Always
Comment 1 Stephan Eberle CLA 2011-08-05 08:32:50 EDT
(In reply to comment #0)
> --> not consistent --> We should keep similarity of 2 cases by adding step 2
> and 3 for case2.

Sounds reasonable. Would you mind providing a patch for that?
Comment 2 Lan Phan CLA 2011-08-05 23:20:46 EDT
Created attachment 201036 [details]
EValidatorAdapter.patch

> Sounds reasonable. Would you mind providing a patch for that?
Here it is. The most important point is to update DiagnosticChain with new status, because DiagnosticChain is used to show result of validation process
Comment 3 Lan Phan CLA 2011-08-09 02:48:36 EDT
Created attachment 201118 [details]
EValidatorAdapter.patch2

Please get this patch (EValidatorAdapter.patch2)

Fixed:
Both EditingDomain and non-EditingDomain has:
- Pre-process:
   addFilters(filters)
- Post-process:
   processed(eObject, context, status)
   appendDiagnostics(status, diagnostics)

- removeFilters(filters) is added as finally block after executing batchValidator.validate(...)
Comment 4 Stephan Eberle CLA 2011-08-25 01:44:38 EDT
Fixed by applying 2nd patch.
Comment 5 Balazs Grill CLA 2021-07-14 02:16:40 EDT
Mass-closing Resolved tickets