Bug 236392 - Custom FileModificationValidator invoked for non existing files
Summary: Custom FileModificationValidator invoked for non existing files
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: Chuck Bridgham CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-06-10 05:13 EDT by Milen Manov CLA
Modified: 2008-07-02 23:54 EDT (History)
3 users (show)

See Also:
cbridgha: review+


Attachments
patch (975 bytes, text/plain)
2008-06-10 06:40 EDT, Milen Manov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milen Manov CLA 2008-06-10 05:13:27 EDT
Build ID: I20080523-0100

Steps To Reproduce:
Hello I am using Version: 3.4.0 WTP 3 RC 2
 We have a custom repository provider and a custom FileModificationValidator. When we try to create a reference between a ear project version 1.5 wtp 

invokes providers' validateEdit with params (null, context), where null is the ModelIPath. In JEE5ModelProvider there are these lines:
 if (modelPath == null)
	modelPath = getDefaultResourcePath();
getDefaultResourcePath() returns META-INF/application.xml which does not exist.
Thus our validator is invoked for a non existing file and fails. Only existing files should be tested for edit


More information:
Comment 1 Milen Manov CLA 2008-06-10 06:40:08 EDT
Created attachment 104297 [details]
patch

I propose the following patch
Comment 2 Chuck Bridgham CLA 2008-06-25 11:08:26 EDT
approved
Comment 3 Carl Anderson CLA 2008-07-02 23:54:46 EDT
Committed to R3_0_maintenance