Small stylistic change.
I think this is easier to reason about.
@@ -159,15 +159,15 @@ public class Method extends Member implements HasJsNameInfo {
}
private String getParameterReadableDescription(Variable parameter) {
- boolean isVarargs = parameter == getVarargsParameter();
+ if (parameter == getVarargsParameter()) {
return J2clUtils.format(
- "%s%s %s",
- isVarargs
- ? parameter.getTypeDescriptor().getComponentTypeDescriptor().getReadableDescription()
- : parameter.getTypeDescriptor().getReadableDescription(),
- isVarargs ? "..." : "",
+ "%s... %s",
+ parameter.getTypeDescriptor().getComponentTypeDescriptor().getReadableDescription(),
parameter.getName());
}
+ return J2clUtils.format(
+ "%s %s", parameter.getTypeDescriptor().getReadableDescription(), parameter.getName());
+ }
@Override
public Node accept(Processor processor) {
