View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.java.rule.optimizations;
5   
6   import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
7   
8   public class OptimizationsRulesTest extends SimpleAggregatorTst {
9   
10      private static final String RULESET = "java-optimizations";
11  
12      @Override
13      public void setUp() {
14          addRule(RULESET, "AddEmptyString");
15          addRule(RULESET, "AvoidArrayLoops");
16          addRule(RULESET, "AvoidInstantiatingObjectsInLoops");
17          addRule(RULESET, "LocalVariableCouldBeFinal");
18          addRule(RULESET, "MethodArgumentCouldBeFinal");
19          addRule(RULESET, "RedundantFieldInitializer");
20          addRule(RULESET, "SimplifyStartsWith");
21          addRule(RULESET, "UnnecessaryWrapperObjectCreation");
22          addRule(RULESET, "UseArrayListInsteadOfVector");
23          addRule(RULESET, "UseArraysAsList");
24          addRule(RULESET, "UseStringBufferForStringAppends");
25          addRule(RULESET, "PrematureDeclaration");
26      }
27  }