Bug 457518 - Check Framework should probably only register one instance of validator
Summary: Check Framework should probably only register one instance of validator
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-15 02:37 EST by Andreas Graf CLA
Modified: 2024-05-07 00:12 EDT (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 Andreas Graf CLA 2015-01-15 02:37:54 EST
When handling meta-models that are generated with different packages, check framework should probably register the same instance of validator for each package.

E.g., we have a check:

public class SWACheckValidator extends AbstractCheckValidator {

@Check(constraint = "AUTOSARDUMMY" )
	void checkComponentName(AUTOSAR  c) {
	}
	
	@Check(constraint = "AUTOSARDUMMY" )
	void checkComponentName(ARPackage c) {
	}

Since AUTOSAR and ARPackage come from different EPackages, two different instances of the SWACheckValidator will be registered for each of the packages.

But then during execution, the getFilter() will return two different filters. (One empty).

I would guess that it is safe to assume that, when the user has such a validator that applies to different packages, he would like to have the same instance used for all of them?
Comment 1 Balazs Grill CLA 2024-05-07 00:12:56 EDT
Closed stale issue before migration