|
From: Bill B. <bb...@re...> - 2009-09-07 17:26:15
|
Yes, its fixed in trunk. 8/11. I don't think it is in 1.1.
I'll be doing a 1.2RC1 soon. I've been very sidetracked with my book
and JBoss World.
Michael Brackx wrote:
> Hi,
>
> Was this ever fixed?
>
> Michael
>
> On Wed, Oct 29, 2008 at 1:57 AM, Bill Burke<bb...@re...> wrote:
>> Bug. Didn't know that was the behavior.
>>
>> Michael Brackx wrote:
>>> I get a NullPointerException if setting a header to null with the
>>> ResponseBuilder
>>> Response.ok().header("header", null).build;
>>>
>>> The javadoc for ResponseBuilder.header(String name,Object value)
>>> states "If value is null then all current headers of the same name
>>> will be removed."
>>> So I removed my if's and tried the fluent style for adding multiple
>>> (optional) headers assuming null's are ok.
>>> Response.ok().header("header1", value1).header("header2", value2).build;
>>>
>>> stacktrace:
>>> java.lang.NullPointerException
>>> at
>>> org.jboss.resteasy.plugins.server.servlet.HttpServletResponseHeaders.addResponseHeader(HttpServletResponseHeaders.java:56)
>>> at
>>> org.jboss.resteasy.plugins.server.servlet.HttpServletResponseHeaders.add(HttpServletResponseHeaders.java:51)
>>> at
>>> org.jboss.resteasy.plugins.server.servlet.HttpServletResponseHeaders.putAll(HttpServletResponseHeaders.java:120)
>>> at
>>> org.jboss.resteasy.core.SynchronousDispatcher.outputHeaders(SynchronousDispatcher.java:456)
>>> at
>>> org.jboss.resteasy.core.SynchronousDispatcher.writeJaxrsResponse(SynchronousDispatcher.java:430)
>>> at
>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:357)
>>> at
>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:182)
>>> at
>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:90)
>>> at
>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:66)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>> ...
>>>
>>>
>>> Michael Brackx
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Resteasy-developers mailing list
>>> Res...@li...
>>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|