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

Bug 352515

Summary: ContainerImpl#getFile(String URI) will not always find a file (even if the container has the file)
Product: [WebTools] WTP Java EE Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: jst.j2eeAssignee: Roberto Sanchez Herrera <shr31223>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc
Version: 3.2.4Flags: cbridgha: review+
Target Milestone: 3.2.5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Roberto Sanchez Herrera CLA 2011-07-19 17:53:55 EDT
The method org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl#getFile(String URI) will not always find a file (even if the container has the file). 

The bug 335632 changed the method described above to use absolute paths to search for the files in case the path has more than one segments. But this causes problems with load strategies that load the files using relative paths (like org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.ZipFileLoadStrategyImpl). For these strategies, the files with more than one segment in the path will not be found.
Comment 1 Roberto Sanchez Herrera CLA 2011-07-19 23:07:54 EDT
Created attachment 199950 [details]
Proposed patch
Comment 2 Chuck Bridgham CLA 2011-07-22 16:32:33 EDT
approved
Comment 3 Roberto Sanchez Herrera CLA 2011-07-25 13:00:04 EDT
Code committed to R3_2_maintenance and HEAD for WTP 3.2.5, 3.3.1 and 3.4.