intercept with stop and predicate causes NPE
--------------------------------------------

                 Key: CAMEL-675
                 URL: https://issues.apache.org/activemq/browse/CAMEL-675
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 1.4.0
            Reporter: Claus Ibsen
            Priority: Critical
             Fix For: 1.4.0


I am working to improve the intercept DSL documentation and the new stop() type

This code fails with a NPE

{code}
    public void testInterceptor() throws Exception {
        MockEndpoint mockOk = getMockEndpoint("mock:ok");
        mockOk.expectedBodiesReceived("Camel in Action");

        template.sendBodyAndHeader("direct:order", "Camel in Action", "user", 
"James");

        mockOk.assertIsSatisfied();
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                
intercept(header("user").isEqualTo("test")).to("mock:test").stop();

                from("direct:order").to("mock:ok");
            }
        };
    }


java.lang.NullPointerException
        at 
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:48)
        at org.apache.camel.processor.Interceptor.process(Interceptor.java:41)
        at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
        at 
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
{code}



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to