Camel
  1. Camel
  2. CAMEL-3

Issue with getHeader("", Boolean.class)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: camel-core
    • Labels:
      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            james strachan
            Reporter:
            Noah Nordrum
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development