summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2javae/Gen.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/slice2javae/Gen.cpp b/cpp/src/slice2javae/Gen.cpp
index 92653017c47..fd64ee4c003 100644
--- a/cpp/src/slice2javae/Gen.cpp
+++ b/cpp/src/slice2javae/Gen.cpp
@@ -673,7 +673,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
out << eb;
}
out << eb;
- out << sp << nl << "assert(false);";
+ out << sp << nl << "IceUtil.Debug.Assert(false);";
out << nl << "return IceInternal.DispatchStatus.DispatchOperationNotExist;";
out << eb;
}
@@ -1669,7 +1669,10 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << sp << nl << "public static " << name << nl << "convert(int val)";
out << sb;
- out << nl << "assert val < " << sz << ';';
+ out << nl << "if(IceUtil.Debug.ASSERT)";
+ out << sb;
+ out << nl << "IceUtil.Debug.Assert(val < " << sz << ");";
+ out << eb;
out << nl << "return __values[val];";
out << eb;