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

Bug 328092

Summary: Issues caused by inconsistency with preceding slash in EAR library directory field
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, jsholl
Version: unspecifiedFlags: cbridgha: review+
jsholl: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Patch amkareh: review?

Description Aidyl Kareh CLA 2010-10-19 00:44:02 EDT
Build Identifier: WTP 3.2.2

There are issues whenever the getRuntimePath() method, which returns an absolute path (has preceding slash), is being compared with the library directory value obtained from the application.xml, which is created as a relative path (does not have a preceding slash). If the library directory is not the default value, there is an inconsistency between comparing a relative and an absolute path which causes modules in the library directory to be considered modules (when they should be considered utilities for being in the library directory) and to be added to the application.xml as modules. Also, .jar files in the lib dir folder are now being displayed as possible Manifest entries in the 'Add Manifest Entries' wizard when these should be filtered out.

Reproducible: Always
Comment 1 Aidyl Kareh CLA 2010-10-19 00:47:19 EDT
Created attachment 181150 [details]
Proposed Patch

This patch adds code so that we use the makeRelative() method on both library directory and runtime path before comparing them. Also added code to make sure the library directory path isn't empty since this should mean that there is no library directory and if not checked root items might be considered to be in the library directory.
Comment 2 Chuck Bridgham CLA 2010-10-21 15:30:17 EDT
approved
Comment 3 Jason Sholl CLA 2010-10-25 15:51:55 EDT
code checked into 32M and head for WTP 3.2.3 and 3.3