summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-08-28 04:09:48 +0000
committerMichi Henning <michi@zeroc.com>2003-08-28 04:09:48 +0000
commit0c3176890d8f0aebbb20feeb69ff5189c67bdd06 (patch)
tree27c7c5dc99a72ac5d54eae7eea8304aee03881d0 /cpp/src/slice2java/Gen.cpp
parentFixed incorrect code generation of Java tie classes for "amd" metadata (diff)
downloadice-0c3176890d8f0aebbb20feeb69ff5189c67bdd06.tar.bz2
ice-0c3176890d8f0aebbb20feeb69ff5189c67bdd06.tar.xz
ice-0c3176890d8f0aebbb20feeb69ff5189c67bdd06.zip
Fixed Java code generation bug: parameters named "current" resulted in
illegal code.
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index ef0e9cf62ae..6698c948f9c 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -416,17 +416,17 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
out << eb << ';';
- out << sp << nl << "public boolean" << nl << "ice_isA(String s, Ice.Current current)";
+ out << sp << nl << "public boolean" << nl << "ice_isA(String s, Ice.Current __current)";
out << sb;
out << nl << "return java.util.Arrays.binarySearch(__ids, s) >= 0;";
out << eb;
- out << sp << nl << "public String[]" << nl << "ice_ids(Ice.Current current)";
+ out << sp << nl << "public String[]" << nl << "ice_ids(Ice.Current __current)";
out << sb;
out << nl << "return __ids;";
out << eb;
- out << sp << nl << "public String" << nl << "ice_id(Ice.Current current)";
+ out << sp << nl << "public String" << nl << "ice_id(Ice.Current __current)";
out << sb;
out << nl << "return __ids[" << scopedPos << "];";
out << eb;
@@ -699,9 +699,9 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
out << eb << ';';
out << sp << nl << "public IceInternal.DispatchStatus" << nl
- << "__dispatch(IceInternal.Incoming in, Ice.Current current)";
+ << "__dispatch(IceInternal.Incoming in, Ice.Current __current)";
out << sb;
- out << nl << "int pos = java.util.Arrays.binarySearch(__all, current.operation);";
+ out << nl << "int pos = java.util.Arrays.binarySearch(__all, __current.operation);";
out << nl << "if(pos < 0)";
out << sb;
out << nl << "return IceInternal.DispatchStatus.DispatchOperationNotExist;";
@@ -717,23 +717,23 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
out << sb;
if(opName == "ice_facets")
{
- out << nl << "return ___ice_facets(this, in, current);";
+ out << nl << "return ___ice_facets(this, in, __current);";
}
else if(opName == "ice_id")
{
- out << nl << "return ___ice_id(this, in, current);";
+ out << nl << "return ___ice_id(this, in, __current);";
}
else if(opName == "ice_ids")
{
- out << nl << "return ___ice_ids(this, in, current);";
+ out << nl << "return ___ice_ids(this, in, __current);";
}
else if(opName == "ice_isA")
{
- out << nl << "return ___ice_isA(this, in, current);";
+ out << nl << "return ___ice_isA(this, in, __current);";
}
else if(opName == "ice_ping")
{
- out << nl << "return ___ice_ping(this, in, current);";
+ out << nl << "return ___ice_ping(this, in, __current);";
}
else
{
@@ -749,7 +749,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
assert(cl);
if(cl->scoped() == p->scoped())
{
- out << nl << "return ___" << opName << "(this, in, current);";
+ out << nl << "return ___" << opName << "(this, in, __current);";
}
else
{
@@ -762,7 +762,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
{
base = getAbsolute(cl->scoped(), scope);
}
- out << nl << "return " << base << ".___" << opName << "(this, in, current);";
+ out << nl << "return " << base << ".___" << opName << "(this, in, __current);";
}
break;
}
@@ -957,7 +957,7 @@ Slice::Gen::OpsVisitor::visitOperation(const OperationPtr& p)
{
out << ", ";
}
- out << "Ice.Current current";
+ out << "Ice.Current __current";
}
out << ')';
ExceptionList throws = p->throws();
@@ -1089,7 +1089,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << ", ";
}
- out << "Ice.Current current";
+ out << "Ice.Current __current";
}
out << ')';
@@ -1111,7 +1111,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << ", ";
}
- out << "current";
+ out << "__current";
}
out << ");";
out << eb;
@@ -3908,7 +3908,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(Output& out, const string& scope, co
ParamDeclList::const_iterator q;
out << sp << nl << "public void" << nl << opName << "_async(" << getParamsAsync(op, scope, true)
- << ", Ice.Current current)";
+ << ", Ice.Current __current)";
ExceptionList throws = op->throws();
throws.sort();
@@ -3967,7 +3967,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(Output& out, const string& scope, co
{
out << ", ";
}
- out << "Ice.Current current";
+ out << "Ice.Current __current";
}
out << ')';