Hi Vincent, Agreed, let's reuse the safer "getValue() : String" method introduced in StringRepresentation and deprecate toString(). Checked in SVN.
Best regards, Jerome > -----Message d'origine----- > De : news [mailto:[EMAIL PROTECTED] De la part de Vincent > Envoyé : jeudi 2 novembre 2006 19:28 > À : [email protected] > Objet : toString shouldn't change the object's state > > > Hi Jerome, > > I came across this as I was running my code in the debugger > this morning: > > Request.getEntityAsString calls > org.restlet.ext.data.InputRepresentation.toString(), which > calls getStream(), > which sets the stream to null after returning it. > It's all fine and dandy until you run your code in the > debugger, and display the > request's content. If the debugger calls entity.toString to > display the > Representation, it might take you a while to figure out why > you've suddenly lost > your from data. > > > -Vincent. >

