Merge branch 'master' into deprecate-jjtree-methods

This commit is contained in:
Clément Fournier
2020-01-05 23:17:25 +01:00
50 changed files with 679 additions and 203 deletions

View File

@ -19,8 +19,8 @@ import net.sourceforge.pmd.Report;
import net.sourceforge.pmd.Rule;
import net.sourceforge.pmd.RuleContext;
import net.sourceforge.pmd.RuleSet;
import net.sourceforge.pmd.RuleSetFactory;
import net.sourceforge.pmd.RuleSets;
import net.sourceforge.pmd.RulesetsFactoryUtils;
import net.sourceforge.pmd.internal.util.IteratorUtil;
import net.sourceforge.pmd.lang.LanguageRegistry;
import net.sourceforge.pmd.lang.LanguageVersionHandler;
@ -77,7 +77,7 @@ public class ScalaRuleTest {
Report report = new Report();
ctx.setReport(report);
ctx.setSourceCodeFile(new File("test.scala"));
RuleSet rules = new RuleSetFactory().createSingleRuleRuleSet(r);
RuleSet rules = RulesetsFactoryUtils.defaultFactory().createSingleRuleRuleSet(r);
p.getSourceCodeProcessor().processSourceCode(new StringReader(test), new RuleSets(rules), ctx);
return report;
}

View File

@ -19,9 +19,9 @@ import net.sourceforge.pmd.Report;
import net.sourceforge.pmd.Rule;
import net.sourceforge.pmd.RuleContext;
import net.sourceforge.pmd.RuleSet;
import net.sourceforge.pmd.RuleSetFactory;
import net.sourceforge.pmd.RuleSets;
import net.sourceforge.pmd.RuleViolation;
import net.sourceforge.pmd.RulesetsFactoryUtils;
import net.sourceforge.pmd.lang.LanguageRegistry;
import net.sourceforge.pmd.lang.rule.XPathRule;
import net.sourceforge.pmd.lang.rule.xpath.XPathRuleQuery;
@ -57,7 +57,7 @@ public class XPathRuleTest extends RuleTst {
Report report = new Report();
ctx.setReport(report);
ctx.setSourceCodeFile(new File("test.scala"));
RuleSet rules = new RuleSetFactory().createSingleRuleRuleSet(r);
RuleSet rules = RulesetsFactoryUtils.defaultFactory().createSingleRuleRuleSet(r);
p.getSourceCodeProcessor().processSourceCode(new StringReader(test), new RuleSets(rules), ctx);
return report;
}