Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 199950 Details for
Bug 352515
ContainerImpl#getFile(String URI) will not always find a file (even if the container has the file)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
bug352515.patch (text/plain), 1.44 KB, created by
Roberto Sanchez Herrera
on 2011-07-19 23:07:54 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Roberto Sanchez Herrera
Created:
2011-07-19 23:07:54 EDT
Size:
1.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.j2ee.core >Index: commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ContainerImpl.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ContainerImpl.java,v >retrieving revision 1.6.2.1 >diff -u -r1.6.2.1 ContainerImpl.java >--- commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ContainerImpl.java 3 Mar 2011 19:48:25 -0000 1.6.2.1 >+++ commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ContainerImpl.java 20 Jul 2011 03:06:18 -0000 >@@ -202,13 +202,19 @@ > getFiles(); > } > >- IPath URIPath = new Path(URI); >+ // Some load strategies load the files as relative, and some as absolute paths, so... >+ // First try with the original URI >+ File file = (File) getFileIndex().get(URI); > >- if (URIPath.segmentCount() > 1) >- URIPath = URIPath.makeAbsolute(); >- >- File file = (File) getFileIndex().get(URIPath.toString()); >- >+ if (file == null){ >+ // If the file was not found, try using absolute path >+ IPath URIPath = new Path(URI); >+ if (URIPath.segmentCount() > 1){ >+ URIPath = URIPath.makeAbsolute(); >+ file = (File) getFileIndex().get(URIPath.toString()); >+ } >+ } >+ > if (file == null) { > throw new java.io.FileNotFoundException(URI); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 352515
: 199950