Path of "." and ""
Francis Galiegue
fgaliegue at gmail.com
Mon Dec 22 12:52:04 UTC 2014
On Mon, Dec 22, 2014 at 11:18 AM, Weijun Wang <weijun.wang at oracle.com> wrote:
[...]
>>>>
>>>> I am just complaining it's not intuitive that an empty Path does not
>>>> simply have zero name element.
>>
>> The long standing issue with the empty path is just trying to keep
>> things consistent.
>
>
> Can you give some example? What problem will it make?
>
Well, have you tried implementing Path? ;)
Honestly, that requirement makes things more complicated than what
they need to be (and Path is already hard enough, what with no base
abstract classes directly usable).
My generic (final!) implementation does not obey this requirement
(empty means empty), and I am only saved by the fact that trying and
manipulating paths from different providers together throws a
ProviderMismatchException...
--
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)
More information about the nio-dev
mailing list