You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Hiram Chirino (JIRA)" <ji...@apache.org> on 2007/06/12 20:56:33 UTC
[jira] Updated: (CAMEL-3) Issue with getHeader("", Boolean.class)
[ https://issues.apache.org/activemq/browse/CAMEL-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiram Chirino updated CAMEL-3:
------------------------------
Fix Version/s: 1.0
> Issue with getHeader("", Boolean.class)
> ---------------------------------------
>
> Key: CAMEL-3
> URL: https://issues.apache.org/activemq/browse/CAMEL-3
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Reporter: Noah Nordrum
> Assignee: James Strachan
> Priority: Critical
> Fix For: 1.0
>
>
> 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.