summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 6698c948f9c..916b1cc635e 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -2403,6 +2403,10 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << sb;
out << nl << "try";
out << sb;
+ if(op->returnsData())
+ {
+ out << "__checkTwowayOnly(\"" << opName << "\");";
+ }
out << nl << "Ice._ObjectDel __delBase = __getDelegate();";
out << nl << '_' << name << "Del __del = (_" << name << "Del)__delBase;";
out << nl;
@@ -2462,6 +2466,10 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << sb;
out << nl << "try";
out << sb;
+ if(op->returnsData())
+ {
+ out << "__checkTwowayOnly(\"" << opName << "\");";
+ }
out << nl << "Ice._ObjectDel __delBase = __getDelegate();";
out << nl << '_' << name << "Del __del = (_" << name
<< "Del)__delBase;";