forked from phoedos/pmd
Remove rule factory singleton
This commit is contained in:
@ -526,7 +526,7 @@ public class RuleSetFactory {
|
||||
&& !isRuleName(ruleElement, ruleSetReferenceId.getRuleName())) {
|
||||
return;
|
||||
}
|
||||
Rule rule = RuleFactory.INSTANCE.buildRule(ruleElement);
|
||||
Rule rule = new RuleFactory().buildRule(ruleElement);
|
||||
rule.setRuleSetName(ruleSetBuilder.getName());
|
||||
|
||||
if (StringUtils.isNotBlank(ruleSetReferenceId.getRuleName())
|
||||
@ -607,7 +607,7 @@ public class RuleSetFactory {
|
||||
|
||||
RuleSetReference ruleSetReference = new RuleSetReference(otherRuleSetReferenceId.getRuleSetFileName(), false);
|
||||
|
||||
RuleReference ruleReference = RuleFactory.INSTANCE.decorateRule(referencedRule, ruleElement);
|
||||
RuleReference ruleReference = new RuleFactory().decorateRule(referencedRule, ruleElement);
|
||||
ruleReference.setRuleSetReference(ruleSetReference);
|
||||
|
||||
|
||||
|
@ -35,8 +35,7 @@ import net.sourceforge.pmd.properties.PropertyDescriptorUtil;
|
||||
*/
|
||||
public class RuleFactory {
|
||||
|
||||
public static final RuleFactory INSTANCE = new RuleFactory();
|
||||
|
||||
|
||||
private static final String DEPRECATED = "deprecated";
|
||||
private static final String NAME = "name";
|
||||
private static final String MESSAGE = "message";
|
||||
@ -52,7 +51,8 @@ public class RuleFactory {
|
||||
private static final String CLASS = "class";
|
||||
|
||||
|
||||
private RuleFactory() {
|
||||
/** Create a new rule factory. */
|
||||
public RuleFactory() {
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user