camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwblackw <jamesblackw...@gmail.com>
Subject Re: org.apache.camel.util.URISupport
Date Fri, 23 May 2014 08:33:13 GMT
You da man Claus.

Sent from my iPhone4s

On May 23, 2014, at 2:55 AM, "Claus Ibsen-2 [via Camel]" <ml-node+s465427n5751498h50@n5.nabble.com>
wrote:

> On Fri, May 23, 2014 at 8:48 AM, Charles Moulliard <[hidden email]> wrote: 
> > I will delete my ticket. Have you committed the modification otherwise I 
> > have done it ... 
> > 
> 
> Yes I got a fix that is currently being tested. So let me handle this. 
> 
> > 
> > On Fri, May 23, 2014 at 8:46 AM, Claus Ibsen <[hidden email]> wrote: 
> > 
> >> Hi 
> >> 
> >> There is already a ticket 
> >> https://issues.apache.org/jira/browse/CAMEL-7459
> >> 
> >> On Fri, May 23, 2014 at 8:41 AM, Charles Moulliard <[hidden email]> 
> >> wrote: 
> >> > Thx for the info. I will open a ticket and add the correction 
> >> > 
> >> > 
> >> > On Thu, May 22, 2014 at 9:19 PM, jwblackw <[hidden email]> 
> >> wrote: 
> >> > 
> >> >> org.apache.camel.util.URISupport 
> >> >> 
> >> >> line 158 
> >> >> 
> >> >> if (i < uri.length() - 2) { 
> >> >> 
> >> >> This instead should be: 
> >> >> 
> >> >> if (i <= uri.length() - 2) { 
> >> >> 
> >> >> The reason is that you are trying to calculate the next character.

> >> >> So for example if we take the string "abc" 
> >> >> When i = 0   we are at 'a' and we calculate next as 'b' 
> >> >> But when i = 1 we are at 'b' and next should be 'c', but since the
if 
> >> >> statement fails the else statement runs and next gets set to '\u0000'

> >> >> 
> >> >> "abc" is a simple example.  Let's try something more "real world" now.

> >> >> 
> >> >> The problem occurs when you have this example string: 
> >> >> 
> >> "flatten=false&recursive=false&delete=true&include=RAW(%5E.*%5B.%5D(xml))"

> >> >> 
> >> >> If you try that string, you can see based on the logic when we get
to 
> >> the 
> >> >> "closed paren" after the l in xml... next gets set to '\u0000' instead

> >> of 
> >> >> ')' like it should.  And then when we get to line 177 
> >> >> boolean end = ch == RAW_TOKEN_END.charAt(0) && (next == '&'
|| next == 
> >> >> '\u0000'); 
> >> >> end gets set to true, when really we are not at the end.  We had 1
more 
> >> >> "closed paren" to process. 
> >> >> 
> >> >> Thus my last value gets set to RAW(%5E.*%5B.%5D(xml) 
> >> >> When it really should be RAW(%5E.*%5B.%5D(xml)) 
> >> >> 
> >> >> Thanks for correcting this. 
> >> >> -James 
> >> >> 
> >> >> 
> >> >> 
> >> >> -- 
> >> >> View this message in context: 
> >> >> 
> >> http://camel.465427.n5.nabble.com/org-apache-camel-util-URISupport-tp5751485.html
> >> >> Sent from the Camel Development mailing list archive at Nabble.com.

> >> >> 
> >> > 
> >> > 
> >> > 
> >> > -- 
> >> > Charles Moulliard 
> >> > Apache Committer / Architect @RedHat 
> >> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
> >> 
> >> 
> >> 
> >> -- 
> >> Claus Ibsen 
> >> ----------------- 
> >> Red Hat, Inc. 
> >> Email: [hidden email] 
> >> Twitter: davsclaus 
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >> hawtio: http://hawt.io/
> >> fabric8: http://fabric8.io/
> >> 
> > 
> > 
> > 
> > -- 
> > Charles Moulliard 
> > Apache Committer / Architect @RedHat 
> > Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
> 
> 
> 
> -- 
> Claus Ibsen 
> ----------------- 
> Red Hat, Inc. 
> Email: [hidden email] 
> Twitter: davsclaus 
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
> 
> 
> If you reply to this email, your message will be added to the discussion below:
> http://camel.465427.n5.nabble.com/org-apache-camel-util-URISupport-tp5751485p5751498.html
> To unsubscribe from org.apache.camel.util.URISupport, click here.
> NAML




--
View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-util-URISupport-tp5751485p5751507.html
Sent from the Camel Development mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message