From df2d1b806e4c20c292bf7c6213128b9c2756fba3 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 14 Oct 2022 16:57:47 +0200 Subject: [PATCH] [apex] ApexUnitTestClassShouldHaveRunAsRule - remove unnecessary constructor --- .../ApexUnitTestClassShouldHaveRunAsRule.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/ApexUnitTestClassShouldHaveRunAsRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/ApexUnitTestClassShouldHaveRunAsRule.java index dade018d57..7a417a43b0 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/ApexUnitTestClassShouldHaveRunAsRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/ApexUnitTestClassShouldHaveRunAsRule.java @@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.apex.rule.bestpractices; import java.util.List; -import net.sourceforge.pmd.RulePriority; import net.sourceforge.pmd.lang.apex.ast.ASTMethod; import net.sourceforge.pmd.lang.apex.ast.ASTRunAsBlockStatement; import net.sourceforge.pmd.lang.apex.ast.ApexNode; @@ -19,12 +18,6 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexUnitTestRule; */ public class ApexUnitTestClassShouldHaveRunAsRule extends AbstractApexUnitTestRule { - public ApexUnitTestClassShouldHaveRunAsRule() { - setName("ApexUnitTestClassShouldHaveRunAsRule"); - setMessage("Apex unit test classes should have at least one System.runAs() call"); - setPriority(RulePriority.MEDIUM); - } - @Override public Object visit(ASTMethod node, Object data) { if (!isTestMethodOrClass(node)) {