You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mdo <ma...@gmail.com> on 2013/04/04 12:04:04 UTC
2.11: NPE with replaceFirst()
Hello,
I have a simple language expression like the one shown below.
<simple>http4:${header.myUrlString.replaceFirst("http:","")}</simple>
It does work with Camel 2.10.x but throws a NPE with 2.11-SNAPSHOT because
the replacement ("") parameter sent to the String/Matcher classes is null.
I've got it working again by changing my code to:
<simple>${header.myUrlString.replaceFirst("http:","http4:")}</simple>
Is this a bug in 2.11?
Regards, mdo.
--
View this message in context: http://camel.465427.n5.nabble.com/2-11-NPE-with-replaceFirst-tp5730321.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: 2.11: NPE with replaceFirst()
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6261
On Thu, Apr 4, 2013 at 4:23 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah the NPE would be a bug. Feel free to log a JIRA ticket
>
> On Thu, Apr 4, 2013 at 12:04 PM, mdo <ma...@gmail.com> wrote:
>> Hello,
>>
>> I have a simple language expression like the one shown below.
>>
>> <simple>http4:${header.myUrlString.replaceFirst("http:","")}</simple>
>>
>> It does work with Camel 2.10.x but throws a NPE with 2.11-SNAPSHOT because
>> the replacement ("") parameter sent to the String/Matcher classes is null.
>>
>> I've got it working again by changing my code to:
>> <simple>${header.myUrlString.replaceFirst("http:","http4:")}</simple>
>>
>> Is this a bug in 2.11?
>>
>> Regards, mdo.
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/2-11-NPE-with-replaceFirst-tp5730321.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: 2.11: NPE with replaceFirst()
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yeah the NPE would be a bug. Feel free to log a JIRA ticket
On Thu, Apr 4, 2013 at 12:04 PM, mdo <ma...@gmail.com> wrote:
> Hello,
>
> I have a simple language expression like the one shown below.
>
> <simple>http4:${header.myUrlString.replaceFirst("http:","")}</simple>
>
> It does work with Camel 2.10.x but throws a NPE with 2.11-SNAPSHOT because
> the replacement ("") parameter sent to the String/Matcher classes is null.
>
> I've got it working again by changing my code to:
> <simple>${header.myUrlString.replaceFirst("http:","http4:")}</simple>
>
> Is this a bug in 2.11?
>
> Regards, mdo.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/2-11-NPE-with-replaceFirst-tp5730321.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen