Make inner Isset classes implement serializable
authorMark Slee <mcslee@apache.org>
Mon, 4 Feb 2008 21:34:22 +0000 (21:34 +0000)
committerMark Slee <mcslee@apache.org>
Mon, 4 Feb 2008 21:34:22 +0000 (21:34 +0000)
Summary: Since the outer class is serializable, you'll want it on the inner member too. Though in general you shouldn't be using Java to serialize Thrift objects, as that misses the point and tosses version compatibility out the window.

Reviewed By: dreiss

Test Plan: Generate Java code

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665460 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_java_generator.cc

index cd4b873..37c0c59 100644 (file)
@@ -383,7 +383,7 @@ void t_java_generator::generate_java_struct_definition(ofstream &out,
     out <<
       endl <<
       indent() << "public final Isset __isset = new Isset();" << endl <<
-      indent() << "public static final class Isset {" << endl;
+      indent() << "public static final class Isset implements java.io.Serializable {" << endl;
     indent_up();
       for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
         indent(out) <<