Re: API for parsing path strings

2018-07-23 Thread Jonathan Gibbons
Hi Roger, The point about early parsing is a weak one, because it would mostly just seem to apply to JDK itself. That being said, a variant of this argument is that it allows folk to choose how to map strings to Paths, e.g. using a custom (non-default) file system, and that argument is more c

Re: API for parsing path strings

2018-07-23 Thread Roger Riggs
Hi Jon, I agree that supporting Paths leads people in the right direction. Two considerations led me to propose the simpler String version first. 1.  Early parsing of paths can occur before the file systems that support Path have been initialized. 2.  There is an additional exception that can oc

Re: API for parsing path strings

2018-07-23 Thread Jonathan Gibbons
Roger, Having written internal library code for both javac and jtreg to do what you suggest, I would support such an API. I note that as well as parsing system properties, it would also be a useful API for command-line tools that accept paths as options. However, I would suggest that it is

Re: API for parsing path strings

2018-07-19 Thread Brian Burkhalter
Hi Roger, Well if there is some developer interest in it and it would consolidate and make code more robust in the JDK then it seems worth pursuing. Thanks, Brian On Jul 19, 2018, at 1:30 PM, Roger Riggs wrote: > No particular novel use cases. > There are quite a few places in OpenJDK tool

Re: API for parsing path strings

2018-07-19 Thread Roger Riggs
Hi Brian, No particular novel use cases. There are quite a few places in OpenJDK tools, etc that naively use string.split(pathSeparator) that will misbehave on Windows in the edge cases and may not be paying attention to the empty path component case. It would provide a measure of regularity a

Re: API for parsing path strings

2018-07-19 Thread Brian Burkhalter
Hi Roger, I was just wondering whether you have some specific use cases in mind. Thanks, Brian On Jul 19, 2018, at 12:39 PM, Roger Riggs wrote: > Parsing of paths such as the values of properties java.class.path and > java.library.path > do not have direct support in the Java API. > There a

API for parsing path strings

2018-07-19 Thread Roger Riggs
Hi, Parsing of paths such as the values of properties java.class.path and java.library.path do not have  direct support in the Java API. There are several implementations within OpenJDK and a few variations exist with regard to treatment of empty path elements and on Windows support for quoti