Skip to content

Commit

Permalink
fix pmd error
Browse files Browse the repository at this point in the history
  • Loading branch information
acraciun committed Jan 12, 2017
1 parent ed4de76 commit afd95a8
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -15,10 +15,8 @@
public class MethodVarArgParamCheck implements CheckContributor<MethodTree> {

private void checkVarArg(MethodTree tree, VariableTree param, GenerationContext<Void> context) {
if (param.getName().toString().equals(GeneratorConstants.ARGUMENTS_PARAMETER)) {
if (tree.getParameters().size() != 1) {
context.addError(tree, "'arguments' parameter has to be the only parameter of the method");
}
if (param.getName().toString().equals(GeneratorConstants.ARGUMENTS_PARAMETER) && tree.getParameters().size() != 1) {
context.addError(tree, "'arguments' parameter has to be the only parameter of the method");
}
}

Expand Down

0 comments on commit afd95a8

Please sign in to comment.