Hi Gabriel and al.

I have just fixed this issue causing the object conversion to fail when
including negative values. It wasn’t due to the internal HTTP connector, but
to the logic converting an OutputStream into an InputStream located in the
BioUtils class.

Thanks for the report, this was a subtle yet potentially nasty bug impacting
all OutputRepresentation subclasses such as :
•       EmfRepresentation
•       FormDataSet
•       JaxRsOutputRepresentation
•       ObjectRepresentation

This is now fixed in 2.0/2.1/master, including a non-regression test. 

Best regards,
Jerome
--
http://www.restlet.com
http://twitter.com/#!/jlouvel


-----Message d'origine-----
De : Gabriel Pulido [mailto:[email protected]] 
Envoyé : samedi 4 février 2012 20:36
À : [email protected]
Objet : RE: ObjectRepresentation with an Object embedding a negative int
value

Hello,
I'm having this issue in a restlet 2.1RC2 version.

I'm tring to deserialize an object that have a -1 value in an int variable
and it fails when the client tries to deserialize.
If I transform the int to double or use a positive value, it doesn't fails.

The error is raised on the line 76 of the ObjectRepresentation.java.

My test object is just:

public class TestFailNegative implements Serializable { private int value;

public TestFailNegative()
    {
value = -1;

}
}

This is annoying as I had spent a couple of days trying to figure out why my
code fail (but hopefully I found it :) )

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=29181
69

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2951164

Reply via email to