8207690: Parsing API for classpath and similar path strings
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Sep 10 18:28:07 UTC 2018
Roger,
You've run into the standard naming ambiguity problem of "when is a path
a search path, with elements separated by File.pathSeparator (e.g. class
path, source path), and when is it a file path, with elements separated
by File.separator (e.g. a nio.file.Path identifying a file or directory)?"
This shows up most obviously in the method confusingly named "pathToPaths".
In other contexts (javac, jtreg, etc) I've tried to use the term "search
path" to describe the string that is a sequence of elements separated by
File.pathSeparator.
-- Jon
On 9/10/18 11:16 AM, Roger Riggs wrote:
> Please review the API and implementation of an API to parse Path strings.
> Two methods are added to java.nio.file.Paths to parse a string using
> the path separator delimiter
> and return either List<String> or List<Path>. Empty path elements are
> ignored.
>
> For compatibility with current URLClassPath behavior the internal
> implementation handles
> replacement of empty paths.
>
> Webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-8207690_parsing_api_for_classpath_and_similar_path_strings/
>
>
> CSR:
> https://bugs.openjdk.java.net/browse/JDK-8208208
>
> Thanks, Roger
>
More information about the core-libs-dev
mailing list