To me, this doesn't seem to have anything to do with REST. It seems like the same problem as anytime you are reading parameters out of a request. In this case, the streamreader is passed to XStream and JSON-libe so that they can populate Java objects inline. If a Map has already been created from the parameters (which I think it has), I believe you could also pass that to both libraries to translate into target objects.
Just another potential approach. I don't understand the reasoning behind the request specs that got posted in the JIRA ticket. On Thu, Feb 14, 2008 at 3:07 PM, Al Sutton <[EMAIL PROTECTED]> wrote: > I've always been a fan of a working solution over waiting for the perfect > solution. > > If it fixes the problem, and doesn't cause any other issues then it's one > step on from having a problem. If a REST expert wants to optimize the > solution then that can be done as another step. > > Al. > > ----- Original Message ----- > From: "Matt Raible" <[EMAIL PROTECTED]> > To: "Struts Developers List" <dev@struts.apache.org> > Sent: Thursday, February 14, 2008 4:54 PM > Subject: Re: feedback on patches > > > > <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] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >