JDK 9 RFR of 8153250: java.io.File does not handle Windows paths of the form "D:" (no path) correctly
Brian Burkhalter
brian.burkhalter at oracle.com
Tue Jan 10 01:09:05 UTC 2017
Please review at your convenience.
Issue: https://bugs.openjdk.java.net/browse/JDK-8153250
Patch: http://cr.openjdk.java.net/~bpb/8153250/webrev.00/
On Windows only, when resolving a child path against a parent, do not interpose a file separator (slash) if the parent is a two-character string consisting of a drive letter followed by a colon. In this case the concatenation represents a directory-relative path [1]. The core regression tests pass with this patch applied as does the test added in this patch; the new test fails without the implementation change.
Thanks,
Brian
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
More information about the core-libs-dev
mailing list