From: Adam R. <ad...@ex...> - 2015-07-03 16:04:49
|
Yes I realise it is the existing method. But, if there is no javadoc describing what it does, then your guess is as good as mine! On 3 July 2015 at 16:14, Dmitriy Shabanov <sha...@gm...> wrote: > That is existing method at current code of XmldbURI. > > Main question that I have: should exception be raised and if yes - where? > > On Fri, Jul 3, 2015 at 5:59 PM, Adam Retter <ad...@ex...> wrote: >> >> I have no idea? >> >> Certainly if you did new java.net.URI("/db/xmldb:something #1.dita") >> you will get a URISyntaxException due to the space. >> >> It depends what the contract of the `create` function is, is it meant >> to URI encode? >> >> On 3 July 2015 at 15:50, Dmitriy Shabanov <sha...@gm...> wrote: >> > Hi, >> > >> > Is this test correct? >> > >> > XmldbURI uri = XmldbURI.create("/db/xmldb:something #1.dita"); >> > >> > assertEquals("xmldb:/db/xmldb:something%20#1.dita", uri.toString()); >> > assertEquals("xmldb:something%20#1.dita", uri.lastSegment().toString()); > > > > -- > Dmitriy Shabanov -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |