diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 3679a6480b..b2199250b8 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -29,6 +29,10 @@ This is a {{ site.pmd.release_type }} release. * pmd-java * {% jdoc java::lang.java.ast.CanSuppressWarnings %} and its implementations * {% jdoc java::lang.java.rule.AbstractJavaRule#isSuppressed(Node) %} + * {% jdoc java::lang.java.rule.JavaRuleViolation#isSupressed(Node,Rule) %} +* pmd-apex + * {% jdoc java::lang.apex.ast.CanSuppressWarnings %} and its implementations + * {% jdoc java::lang.apex.rule.ApexRuleViolation#isSupressed(Node,Rule) %} ### External Contributions diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.java index cc6249d6b0..0aa0b9ba84 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.java @@ -6,6 +6,11 @@ package net.sourceforge.pmd.lang.apex.ast; import net.sourceforge.pmd.Rule; +/** + * @deprecated This interface will be removed, the AST should not know about rules. + */ +@Deprecated public interface CanSuppressWarnings { + @Deprecated boolean hasSuppressWarningsAnnotationFor(Rule rule); } diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolation.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolation.java index fd44350f5d..b5019a908e 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolation.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolation.java @@ -44,9 +44,10 @@ public class ApexRuleViolation extends ParametricRuleViolation { /** * Check for suppression on this node, on parents, and on contained types * for ASTCompilationUnit - * - * @param node + * + * @deprecated Is internal API, not useful, there's a typo. See #1927 */ + @Deprecated public static boolean isSupressed(Node node, Rule rule) { boolean result = suppresses(node, rule); @@ -57,7 +58,7 @@ public class ApexRuleViolation extends ParametricRuleViolation { parent = parent.jjtGetParent(); } } - + return result; } diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.java index 60d34b6b19..7990caaf39 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.java @@ -78,7 +78,7 @@ public class JavaRuleViolation extends ParametricRuleViolation { * * @param node * - * @deprecated Is internal API, not useful, there's a typo in there. See #1927 + * @deprecated Is internal API, not useful, there's a typo. See #1927 */ @Deprecated public static boolean isSupressed(Node node, Rule rule) {