diff options
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index dbd2ddfd280..7cd4c75f268 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -2552,9 +2552,9 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) out << eb; // - // A method cannot have more than 255 parameters (including the implicit "this" argument). + // Generate constructor if the parameter list is not too large. // - if(allDataMembers.size() < 255) + if(isValidMethodParameterList(allDataMembers)) { DataMemberList baseDataMembers; if(baseClass) @@ -2945,9 +2945,9 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) } // - // A method cannot have more than 255 parameters (including the implicit "this" argument). + // Generate constructor if the parameter list is not too large. // - if(allDataMembers.size() < 255) + if(isValidMethodParameterList(allDataMembers)) { if(hasRequiredMembers && hasOptionalMembers) { @@ -3010,8 +3010,9 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) // // Create constructor that takes all data members plus a Throwable. + // Do this only when the parameter list is not too large. // - if(allDataMembers.size() < 254) + if(isValidMethodParameterList(allDataMembers, 1)) { const string causeParamName = getEscapedParamName(allDataMembers, "cause"); @@ -3090,9 +3091,10 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) out << eb; // - // Create constructor that takes all data members plus a Throwable + // Create constructor that takes all data members plus a Throwable. + // Do this only when the parameter list is not too large. // - if(allDataMembers.size() < 254) + if(isValidMethodParameterList(allDataMembers, 1)) { const string causeParamName = getEscapedParamName(allDataMembers, "cause"); @@ -3382,9 +3384,9 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) out << eb; // - // A method cannot have more than 255 parameters (including the implicit "this" argument). + // Generate constructor if the parameter list is not too large. // - if(members.size() < 255) + if(isValidMethodParameterList(members)) { vector<string> paramDecl; vector<string> paramNames; |