Applied patch 46921 for tracker item 716243

(fix NPE in pmd-netbeans) by initializing all
options with (seemingly sensible) defaults.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1712 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Gunnlaugur Thor Briem
2003-04-08 19:00:13 +00:00
parent 77bcf4f674
commit 13c8e43fd4

View File

@ -50,6 +50,9 @@ public class PMDOptionsSettings extends SystemOption {
public final static String PROP_ENABLE_SCAN = "EnableScan";
/** Default interval for scanning, 10 seconds. **/
public static final int DEFAULT_SCAN_INTERVAL = 10;
/** The default rules.*/
private static final String DEFAULT_RULES =
"AvoidDuplicateLiterals, StringToString, StringInstantiation, JUnitStaticSuite, " +
@ -70,6 +73,9 @@ public class PMDOptionsSettings extends SystemOption {
protected void initialize() {
super.initialize();
setRules( DEFAULT_RULES );
setRulesets(new CustomRuleSetSettings());
setScanEnabled(Boolean.FALSE);
setScanInterval(new Integer(DEFAULT_SCAN_INTERVAL));
}