8207690: Parsing API for classpath and similar path strings
roger.riggs at oracle.com
Tue Sep 11 13:18:48 UTC 2018
On 9/11/18 7:50 AM, Chris Hegarty wrote:
>> On 11 Sep 2018, at 10:24, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>> On 10/09/2018 21:55, Roger Riggs wrote:
>>> Nope! there's quoting on Windows that gets short changed with that work around.
>>> Other opinions?, Suggestions?
>> One suggestion is reduce this down to one method that returns a stream rather than a collection. It could work lazily if you want. Something like:
>> Stream<String> splitSearchPath(String input)
> I agree with Alan, this seems like the lowest-order primitive.
How can that be? The Stream creates a lot more objects and takes even
more to use it.
It can't be stored or re-used and has higher overhead that can't easily
> I refreshed my memory of search path splitting from the `jmod` tool,
> where such an API would be useful ( if we weren’t using joptsimple ).
> There are two separate use cases, ClassPathConverter, and
> DirPathConverter ( in JmodTask ), both of which resolve each String
> path value against the current working directory, and do some
> context specific validation.
Command line tools are more likely to resolve against the current directory
List<String> is least common but still pushes more to the developer.
More information about the core-libs-dev