Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352515 - ContainerImpl#getFile(String URI) will not always find a file (even if the container has the file)
Summary: ContainerImpl#getFile(String URI) will not always find a file (even if the co...
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.5   Edit
Assignee: Roberto Sanchez Herrera CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 17:53 EDT by Roberto Sanchez Herrera CLA
Modified: 2011-07-25 13:00 EDT (History)
1 user (show)

See Also:
cbridgha: review+


Attachments
Proposed patch (1.44 KB, patch)
2011-07-19 23:07 EDT, Roberto Sanchez Herrera CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.