Issue with getHeader("", Boolean.class)
---------------------------------------

                 Key: CAMEL-3
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3
             Project: Apache Camel
          Issue Type: Bug
          Components: core
            Reporter: Noah Nordrum
            Assignee: James Strachan
            Priority: Critical


    public void testNPE() throws Exception {
        final CamelContext camelContext = new DefaultCamelContext();
        final String fromQueue = "queue:A";
        camelContext.addRoutes(new RouteBuilder() {
            public void configure() throws Exception {
                from(fromQueue).process(new Processor() {
                    public void process(Exchange exchange) throws Exception {
                        final Message in = exchange.getIn();
                        assertNotNull("Message is Null", in);
                        String isDebugString = in.getHeader("someproperty", 
String.class);
                        assertNull(isDebugString);
                        assertNotNull("Message is Null", in);
                        boolean isDebug = in.getHeader("someproperty", 
Boolean.class);
                        assertFalse(isDebug);
                    }
                });
            }
        });
        camelContext.start();
        new CamelTemplate(camelContext).sendBody(fromQueue, "ha!");
        Thread.sleep(5000L);
    }

throws NPE on the isDebug = ... line.

-- 
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