You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2013/04/07 22:01:16 UTC

[jira] [Updated] (THRIFT-1038) 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

     [ https://issues.apache.org/jira/browse/THRIFT-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier updated THRIFT-1038:
--------------------------------

    Issue Type: Sub-task  (was: Bug)
        Parent: THRIFT-1920
    
> 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
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1038
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1038
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: Java - Compiler
>    Affects Versions: 0.3, 0.4, 0.5
>         Environment: All
>            Reporter: Mathias Herberts
>            Assignee: Mathias Herberts
>            Priority: Blocker
>             Fix For: 0.6, 0.7
>
>         Attachments: THRIFT-1038.patch, thrift-1038-v2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira