EA-41231 (omit synthetic inner class constructor parameter)
This commit is contained in:
@@ -311,20 +311,31 @@ public class NewExprent extends Exprent {
|
||||
if (!enumconst || start < lstParameters.size()) {
|
||||
buf.append("(");
|
||||
|
||||
boolean firstpar = true;
|
||||
boolean firstParam = true;
|
||||
for (int i = start; i < lstParameters.size(); i++) {
|
||||
if (sigFields == null || sigFields.get(i) == null) {
|
||||
if (!firstpar) {
|
||||
Exprent expr = lstParameters.get(i);
|
||||
VarType leftType = constructor.getDescriptor().params[i];
|
||||
|
||||
if (i == lstParameters.size() - 1 && expr.getExprType() == VarType.VARTYPE_NULL) {
|
||||
ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(leftType.value);
|
||||
if (node != null && node.namelessConstructorStub) {
|
||||
break; // skip last parameter of synthetic constructor call
|
||||
}
|
||||
}
|
||||
|
||||
if (!firstParam) {
|
||||
buf.append(", ");
|
||||
}
|
||||
|
||||
TextBuffer buff = new TextBuffer();
|
||||
ExprProcessor.getCastedExprent(lstParameters.get(i), constructor.getDescriptor().params[i], buff, indent, true, tracer);
|
||||
|
||||
ExprProcessor.getCastedExprent(expr, leftType, buff, indent, true, tracer);
|
||||
buf.append(buff);
|
||||
firstpar = false;
|
||||
|
||||
firstParam = false;
|
||||
}
|
||||
}
|
||||
|
||||
buf.append(")");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user