Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
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.