The reader that causes the problem is only accessed (currently) when
JSON or XStream data is posted. I would imagine that
buffering/no-buffering isn't going to make that much difference. Plus,
I tested my fix with the struts2-rest-showcase (or whatever it's
called), which isn't a big app, but I verified the bug and verified
the fix with Jetty 6.1.6 and tested in Tomcat and using whichever
version mvn jetty:run pulls out of cyberspace. I would like to apply
it to help push 2.1.1 a little closer to release, but if Don or
Anthony speak up, I'll hold off.

-Wes

On 2/14/08, Matt Raible <[EMAIL PROTECTED]> wrote:
> <quote from="WW-2350">
> Although I am not sure about how this will affect performance (since
> this reader may not be buffered), this patch resolves the issue. It
> seems that you get the IllegalStateException if getReader() is called
> after a call to getInputStream(). So, I call getInputStream() again
> and create an InputStreamReader with it. The
> ContentTypeHandler.toObject( method only asks for a Reader, so the
> InputStreamReader gladly accepts it. I verified the issue with the
> struts2-rest-showcase and jetty 6.1.6, and I verified that this patch
> fixes the IllegalStateException. I could commit it myself, but I am
> not very familiar with REST or Jetty. Take a look and commit if it is
> a legitimate resolution.
> </quote>
>
> If it fixes the problem, I see no issues with the suggested fix. Of
> course, I'm not that familiar with the REST plugin, so it's probably
> best that someone like Don verifies this is the best solution.
>
> Matt
>
> On Thu, Feb 14, 2008 at 9:48 AM, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
> > Guys,
> >
> >  In an effort to get that money ;-), I'd like to close a few more
> >  JIRAs. This one looks pretty easy, but my unfamiliarity with
> >  Jetty/REST make me a bit apprehensive.
> >
> >  https://issues.apache.org/struts/browse/WW-2350
> >
> >  Can someone take a look at the patch and let me know if if is
> >  accceptable? Also, it looks to be assigned to Don, but I'm thinking
> >  he's been busy lately (writing a book, working a full-time job,
> >  nothing big ;-) ). Is it acceptable to resolve someone else's JIRA?
> >
> >  --
> >  Wesley Wannemacher
> >  President, Head Engineer/Consultant
> >  WanTii, Inc.
> >  http://www.wantii.com
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> http://raibledesigns.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to