camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CAMEL-3) Issue with getHeader("", Boolean.class)
Date Tue, 12 Jun 2007 18:56:33 GMT

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


Mime
View raw message