United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6419701 DefaultFileManager clean up: URI.create
JDK-6419701 : DefaultFileManager clean up: URI.create

Details
Type:
Bug
Submit Date:
2006-04-28
Status:
Closed
Updated Date:
2011-07-25
Project Name:
JDK
Resolved Date:
2011-07-25
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
DefaultFileManager uses URI.create in some places to minimize the changes
before Mustang beta 2.  Ideally, this should be cleaned up.
Similarly, we need to ensure that file names are treated consitently.

For example, this combination is suspect:

   new File(externalizeFileName(packageName), relativeName)

Since reltiveName is a "relative" URI it could be "resource/foo.properties"
where as externalizeFileName(packageName) could be "com\\sun\\foo\\bar".

                                    

Comments
SUGGESTED FIX

It would probably be best to agree on an internal format similar
to the VM's view of the world where we use '/' as package/file
separator character consistently.

Enforcing this with a special type would probably be ideal.

The current situation is a mismatch of different conventions.
                                     
2006-06-23
EVALUATION

Use centralized explicit constructor to expose URISyntaxException. Should eventually consider something more lkek a regex solution to avoid creating URI at all.
                                     
2009-09-08



Hardware and Software, Engineered to Work Together