Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328093

Summary: EAR Library Directory field should not have preceding slash
Product: [WebTools] WTP Java EE Tools Reporter: Aidyl Kareh <amkareh>
Component: jst.j2eeAssignee: Aidyl Kareh <amkareh>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: amkareh, ccc, jsholl
Version: unspecifiedFlags: cbridgha: review+
jsholl: review+
Target Milestone: 3.0.5 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Patch ccc: iplog+

Description Aidyl Kareh CLA 2010-10-19 01:02:29 EDT
Build Identifier: WTP 3.0.5

The 'New library directory location' field's default behavior in the EAR's 'Java EE Module Dependencies' properties page (click on 'Change Library Directory...' button to access field) has a preceding slash ('/') character by default. This character should not be added to the beginning of the library directory path by default and an error should be shown if the user tries to add it.

Reproducible: Always
Comment 1 Aidyl Kareh CLA 2010-10-19 01:07:59 EDT
Created attachment 181152 [details]
Proposed Patch

This patch fixes the default behavior of adding a preceding slash to the
library directory field in the 'Java EE Module Dependencies' properties page and also adds validation to avoid having the user add a preceding slash. This patch also adds code so that when comparing the runtime path, which is an absolute path, with the library directory, which should be a relative path, the makeRelative() method is used on both before comparing them.
Comment 2 Chuck Bridgham CLA 2010-10-28 20:09:51 EDT
approved
Comment 3 Carl Anderson CLA 2010-11-03 12:21:37 EDT
Committed to R3_0_5_patches