Fix PMD dogfood: UncommentedEmptyMethodBody, SimplifyBooleanReturns,

UnnecessaryLocalBeforeReturn, OptimizableToArrayCall,
ClassWithOnlyPrivateConstructorsShouldBeFinal,
UseLocaleWithCaseConversions, NonStaticInitializer, UseCollectionIsEmpty
This commit is contained in:
Andreas Dangel
2018-03-10 12:04:50 +01:00
parent 5b93b14373
commit 8bd1e3b486
143 changed files with 522 additions and 723 deletions

View File

@@ -113,9 +113,9 @@ public class DummyLanguageModule extends BaseLanguageModule {
protected RuleViolation createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message,
int beginLine, int endLine) {
ParametricRuleViolation<Node> rv = new ParametricRuleViolation<Node>(rule, ruleContext, node, message) {
{
// just for testing variable expansion
this.packageName = "foo";
public String getPackageName() {
this.packageName = "foo"; // just for testing variable expansion
return super.getPackageName();
}
};
rv.setLines(beginLine, endLine);

View File

@@ -32,9 +32,8 @@ public class TestDescriptor {
private boolean useAuxClasspath = true;
private int numberInDocument = -1;
// Empty descriptor added to please mvn surefire plugin
public TestDescriptor() {
// Empty default descriptor added to please mvn surefire plugin
}
public TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule) {