Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369593 - New filter rule for target runtime in validator extension point is not working
Summary: New filter rule for target runtime in validator extension point is not working
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.validation (show other bugs)
Version: 3.0.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.2   Edit
Assignee: Rosendo Martinez CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_Approved
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 15:16 EST by Rosendo Martinez CLA
Modified: 2012-02-22 13:16 EST (History)
5 users (show)

See Also:
rosendo: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
rosendo: pmc_approved? (naci.dai)
rosendo: pmc_approved? (deboer)
neil.hauge: pmc_approved+
kaloyan: pmc_approved+
rosendo: pmc_approved? (cbridgha)
ccc: review+


Attachments
Proposed R3_3_maintenance patch (1.34 KB, patch)
2012-01-27 11:01 EST, Rosendo Martinez CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rosendo Martinez CLA 2012-01-24 15:16:43 EST
Build Identifier: 

Adding an exclusion group using the target runtime,  the new target runtime rule is not accepted by the validation framework. An error in the log is shown:

java.lang.IllegalStateException: IWAE0102E An invalid filter rule has been encountered. Contributing plug-in: com.ibm.etools.sca.core, element name: targetRuntime
	at org.eclipse.wst.validation.internal.ValidatorExtensionReader.processRule(ValidatorExtensionReader.java:321)
	at org.eclipse.wst.validation.internal.ValidatorExtensionReader.createFilterGroup(ValidatorExtensionReader.java:296)
	at org.eclipse.wst.validation.internal.ValidatorExtensionReader.processIncludeAndExcludeElement(ValidatorExtensionReader.java:270)
	at org.eclipse.wst.validation.internal.ValidatorExtensionReader.processValidator(ValidatorExtensionReader.java:177)
	at org.eclipse.wst.validation.internal.ValidatorExtensionReader.process(ValidatorExtensionReader.java:65)
	at org.eclipse.wst.validation.internal.ExtensionValidators.<init>(ExtensionValidators.java:43)
	at org.eclipse.wst.validation.internal.ExtensionValidators.instance(ExtensionValidators.java:36)
	at org.eclipse.wst.validation.internal.ValManager.getV2Validators(ValManager.java:345)
	at org.eclipse.wst.validation.internal.ValManager.getValidatorsNotCached(ValManager.java:221)
	at org.eclipse.wst.validation.internal.ValManager.access$1(ValManager.java:220)
	at org.eclipse.wst.validation.internal.ValManager$ValidatorCache.getValidatorsCached(ValManager.java:1256)
	at org.eclipse.wst.validation.internal.ValManager.getValidators(ValManager.java:197)
	at org.eclipse.wst.validation.internal.ValManager.accept(ValManager.java:745)
	at org.eclipse.wst.validation.internal.ValBuilderJob.startingValidation(ValBuilderJob.java:148)
	at org.eclipse.wst.validation.internal.ValBuilderJob.runInWorkspace(ValBuilderJob.java:122)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Looks like the method FilterRule#create(IConfigurationElement rule) has missing a condition for the target runtime.

Reproducible: Always
Comment 1 Rosendo Martinez CLA 2012-01-27 11:01:17 EST
Created attachment 210198 [details]
Proposed R3_3_maintenance patch

Added support for targetRuntime extension point in FilterRule
Comment 2 Chuck Bridgham CLA 2012-02-07 15:40:43 EST
approved
Comment 3 Rosendo Martinez CLA 2012-02-07 15:56:03 EST
PMC Review requested due to UI change

Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug"
(requested by an adopter) please document it as such.

This fix was requested by an adopter -IBM- to resolve the issue where an exclusion group using the target runtime rule is not accepted by the validation framework.


Is there a work-around? If so, why do you believe the work-around is
insufficient?

There is no workaround.


How has the fix been tested? Is there a test case attached to the bugzilla
record? Has a JUnit Test been added?

This has been tested by hand and by running the Java EE Tools JUnit bucket
(which includes validation JUnits) against it.


Give a brief technical overview. Who has reviewed this fix?

Carl Anderson and Charles Bridgham have reviewed this fix.

A new FilterRule instance is created when target runtime rule is specified in the extension point as exclude/include.


What is the risk associated with this fix?

Low - A FilterRule for targetruntime rule is created the same way as other rules.
Comment 4 Roberto Sanchez Herrera CLA 2012-02-08 15:18:13 EST
Code committed to R3_3_maintenance and HEAD for WTP 3.3.2 and 3.4. Resolving bug.