JDK-6508981 : cleanup file separator handling in JavacFileManager
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-01-03
  • Updated: 2016-03-23
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7 b36Fixed OpenJDK6Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
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.
03-01-2007