camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Assigned: (CAMEL-1152) Disallow setting a header with a null name
Date Sun, 07 Dec 2008 11:03:05 GMT


Claus Ibsen reassigned CAMEL-1152:

    Assignee: Claus Ibsen

> Disallow setting a header with a null name
> ------------------------------------------
>                 Key: CAMEL-1152
>                 URL:
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>         Environment: Any
>            Reporter: Ramon Buckland
>            Assignee: Claus Ibsen
>            Priority: Minor
> I have found that it is possible to set the header "name" to null of a message.
> You can set a null header name as follows.. 
>  <setHeader name="someName"><constant>SUCCESS</constant></setHeader>
> This task succeeds, (ie no error occurs) but not as you would expect, because this is
what it is meant to be (@headerName)
> <setHeader headerName="someName"><constant>SUCCESS</constant></setHeader>
> eg: log dumping the header shows   -  Headers:{null=SUCCESS}
> A side effect of this happening is that if you then use the xslt: component after setting
a null header with a value, the xslt (saxon) component  freaks out with a NPE because it is
attempting to set parameters for each header it finds, but the header is there and has a null
> A Snippet of the Stack Trace - 
> java.lang.NullPointerException
> 	at
> 	at net.sf.saxon.Controller.setParameter(
> 	at org.apache.camel.builder.xml.XsltBuilder.addParameters(
> 	at org.apache.camel.builder.xml.XsltBuilder.configureTransformer(
> 	at org.apache.camel.builder.xml.XsltBuilder.process(
> 	at org.apache.camel.impl.ProcessorEndpoint.onExchange(
> 	at org.apache.camel.impl.ProcessorEndpoint$1.process(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message