Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] URIUtil

Just seen your updated PR.  Looking good!

On 30 March 2016 at 09:46, Greg Wilkins <gregw@xxxxxxxxxxx> wrote:

Ugh!  I see what you mean by that code being really hard to understand.... and I think I wrote it :(

So either delEnd=end is never called.... orrrr skip can never be <=0 when the delStart>=0 and delEnd>=delStart and the whole block is never executed?

Either way it looks wrong.  Will have to do some more investigation to work it out. stand by....

At the very least this code needs to be documented.... but a replacement is probably better.... or a big cleanup.

cheers





On 30 March 2016 at 06:43, Guillaume Maillard <guillaume.maillard@xxxxxxxxx> wrote:
Hi,

In URIUtil.canonicalPath()

I saw something strange :

            if (skip<=0 && delStart>=0 && delEnd>=delStart)
            {  
                buf.delete(delStart,delEnd);
                delStart=delEnd=-1;
                if (skip>0)
                    delEnd=end;
            }

IMHO, 'delEnd' is never set to 'end' 
Any clue of the correct behaviour?

Regards,

Guillaume Mailalrd

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--



--

Back to the top