summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-10-13 05:46:26 +0000
committerMichi Henning <michi@zeroc.com>2004-10-13 05:46:26 +0000
commit367a869587e95faa0f0d8daf94302b1e78f055ee (patch)
tree1266f0b247d8f5322a8fb3ec0547bfbaa7fdba84 /cpp/src/slice2java/Gen.cpp
parentMade it illegal for non-local interfaces/classes to be derived from (diff)
downloadice-367a869587e95faa0f0d8daf94302b1e78f055ee.tar.bz2
ice-367a869587e95faa0f0d8daf94302b1e78f055ee.tar.xz
ice-367a869587e95faa0f0d8daf94302b1e78f055ee.zip
Fixed bug in slice2java: with the --impl-tie option, incorrect code was
generated for local interfaces and classes.
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 4f416edb444..16777338943 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -1236,6 +1236,22 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "return _ice_delegate.hashCode();";
out << eb;
+ if(p->isLocal())
+ {
+ out << sp << nl << "public int" << nl << "ice_hash()";
+ out << sb;
+ out << nl << "return hashCode();";
+ out << eb;
+
+ out << sp << nl << "public java.lang.Object" << nl << "clone()";
+ out.inc();
+ out << nl << "throws java.lang.CloneNotSupportedException";
+ out.dec();
+ out << sb;
+ out << nl << "return super.clone();";
+ out << eb;
+ }
+
OperationList ops = p->allOperations();
OperationList::const_iterator r;
for(r = ops.begin(); r != ops.end(); ++r)