diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-05-20 15:59:29 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-05-20 15:59:29 -0230 |
commit | d9dd0b7027939109c904c6a9339475db90ea3c8d (patch) | |
tree | 7f9e5229722f79d9f710d91a348f775f37a27457 /cpp/src/slice2java/Gen.cpp | |
parent | Bug 3996 - slice compilers can terminate on uncaught exceptions (diff) | |
download | ice-d9dd0b7027939109c904c6a9339475db90ea3c8d.tar.bz2 ice-d9dd0b7027939109c904c6a9339475db90ea3c8d.tar.xz ice-d9dd0b7027939109c904c6a9339475db90ea3c8d.zip |
Bug 3999 - do not have local struct/enum implement java.io.Serialize
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index aaf832a60c7..c42b7dc41a4 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -2259,7 +2259,11 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p) out << nl << " **/"; } - out << nl << "public class " << name << " implements java.lang.Cloneable, java.io.Serializable"; + out << nl << "public class " << name << " implements java.lang.Cloneable"; + if(!p->isLocal()) + { + out << ", java.io.Serializable"; + } out << sb; return true; @@ -2779,7 +2783,11 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) out << nl << " **/"; } - out << nl << "public enum " << name << " implements java.io.Serializable"; + out << nl << "public enum " << name; + if(!p->isLocal()) + { + out << " implements java.io.Serializable"; + } out << sb; for(en = enumerators.begin(); en != enumerators.end(); ++en) |