Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353773 - [EMF Validation] bug in EValidatorAdapter.validate(EClass, EObject, DiagnosticChain, Map, Set)
Summary: [EMF Validation] bug in EValidatorAdapter.validate(EClass, EObject, Diagnosti...
Status: CLOSED FIXED
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.7.0   Edit
Assignee: Stephan Eberle CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-03 10:33 EDT by Lan Phan CLA
Modified: 2021-07-14 02:16 EDT (History)
2 users (show)

See Also:
idydieng: iplog-


Attachments
EValidatorAdapter.patch (420 bytes, patch)
2011-08-05 23:20 EDT, Lan Phan CLA
no flags Details | Diff
EValidatorAdapter.patch2 (1.52 KB, patch)
2011-08-09 02:48 EDT, Lan Phan CLA
idydieng: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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