Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314559 - ClasspathDependencyValidator should only run on J2EEModuleVirtualComponent objects
Summary: ClasspathDependencyValidator should only run on J2EEModuleVirtualComponent ob...
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Jason Peterson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 15:41 EDT by Jason Peterson CLA
Modified: 2010-05-27 17:36 EDT (History)
3 users (show)

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


Attachments
patch (1.96 KB, patch)
2010-05-26 15:41 EDT, Jason Peterson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Peterson CLA 2010-05-26 15:41:42 EDT
Created attachment 170084 [details]
patch

If allowClasspathComponentDependency is turned off (default is on) than the ClasspathDependencyValidator will only run on projects that have the web facet.  An adopter product has a project type that contains the web facet, but is not an instanceof J2EEModuleVirtualComponent.  As a result, an invalid warning message appears on the project saying a classpath entry has been found that won't be published or exported. Because these classpath dependency references are unique to a J2EEModuleVirtualComponent we can safely ignore running the validator on components that are not of this type.
Comment 1 Chuck Bridgham CLA 2010-05-26 16:40:56 EDT
approve
Comment 2 Jason Peterson CLA 2010-05-26 16:57:02 EDT
* 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. 

An invalid warning message is being thrown.

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

User would have to know that the validator does not pertain to a particular project type and turn off the validator for the project.  This is not reasonable since a user would not know whether it pertains or not.

    * 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 with the UI and JUnits.

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

The ClasspathDependencyValidator will only run on components that meet the following criteria when the allowClasspathComponentDependency preference is false:
1.  Component has dynamic web facet installed
2.  Component is of type J2EEModuleVirtualComponent
 
Chuck has reviewed this fix.

    * What is the risk associated with this fix? 

None - this only pertains when allowClasspathComponentDependency is turned off
Comment 3 Carl Anderson CLA 2010-05-26 17:43:24 EDT
For the record, Chuck did approve this.  Jason Peterson accidentally reset the review flag when he set the pmc_approved flag.  I am resetting the review flag to +.
Comment 4 Neil Hauge CLA 2010-05-26 22:44:37 EDT
There is certainly some risk associated with this change, but it seems reasonable, and it is always unfortunate to have invalid validation messages.  +1 but interested to hear from other PMC members.
Comment 5 Carl Anderson CLA 2010-05-27 13:33:38 EDT
Committed to HEAD for WTP 3.2 RC3