Details
-
Sub-task
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
0.3, 0.4, 0.5
-
None
-
All
Description
Since THRIFT-830, binary fields are implemented using ByteBuffer instead of byte[], but ByteBuffer are not serializable (in the Java sense), therefore the generated Java classes are not serializable either.
Even though one might expect the Thrift serialization to be used instead of Java serialization, there are situations where the serialization of the classes is not in the hands of the user (think for example about the HttpSession offline storage done in Tomcat), therefore we MUST generate Java classes that are serializable in the Java sense.
I'm finishing up a compiler patch to generate writeObject/readObject methods that will make the generated classes Serializable again, will submit it tonight.
Attachments
Attachments
Issue Links
- breaks
-
THRIFT-1146 Android Incompatibility : in Android < 2.3 java.io.IOException doesn't support for Throwable parameter in constructor
- Closed
-
THRIFT-1226 command line option to disable overriding java serialization
- Open
- relates to
-
THRIFT-3543 Generated Java code for structures containing binary fields (or collections thereof) are not serializable (in the Java sense) even though they implement java.io.Serializable
- Open