United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6508981 cleanup file separator handling in JavacFileManager
6508981 : cleanup file separator handling in JavacFileManager

Details
Type:
Enhancement
Submit Date:
2007-01-03
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7

Related Reports
Backport:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
Internally, JavacFileManager uses Strings to represent paths, and is inconsistent whether such paths should be system-independent (e.g. always use /) or system-dependent (e.g. use File.separatorChar).

We should replace the use of String with some other class that enforces a consistent invariant.

We should also provide better unit tests of JavacFileManager.

                                    

Comments
EVALUATION

Yes.

Add RelativePath/RelativeFile/RelativeDir to encapsulate system independent relative paths, with methods to translate to the file system as needed.
                                     
2007-01-03



Hardware and Software, Engineered to Work Together