1
2
3
4 package net.sourceforge.pmd.lang.java.rule.strictexception;
5
6 import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
7
8 public class StrictExceptionRulesTest extends SimpleAggregatorTst {
9
10 private static final String RULESET = "java-strictexception";
11
12 @Override
13 public void setUp() {
14 addRule(RULESET, "AvoidCatchingGenericException");
15 addRule(RULESET, "AvoidCatchingNPE");
16 addRule(RULESET, "AvoidCatchingThrowable");
17 addRule(RULESET, "AvoidLosingExceptionInformation");
18 addRule(RULESET, "AvoidRethrowingException");
19 addRule(RULESET, "AvoidThrowingNewInstanceOfSameException");
20 addRule(RULESET, "AvoidThrowingNullPointerException");
21 addRule(RULESET, "AvoidThrowingRawExceptionTypes");
22 addRule(RULESET, "DoNotExtendJavaLangError");
23 addRule(RULESET, "ExceptionAsFlowControl");
24 addRule(RULESET, "SignatureDeclareThrowsException");
25 addRule(RULESET, "DoNotThrowExceptionInFinally");
26 }
27 }