[core] Add deprecations for ParametricRuleViolation and ParserOptions#suppressMarker

This commit is contained in:
Andreas Dangel
2020-11-06 16:39:22 +01:00
parent ae7fa3d1fe
commit 75d197b592
3 changed files with 12 additions and 0 deletions

View File

@ -38,6 +38,8 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr
* {% jdoc !!javascript::lang.ecmascript.Ecmascript3Parser %}
* {% jdoc !!javascript::lang.ecmascript.ast.EcmascriptParser#parserOptions %}
* {% jdoc !!javascript::lang.ecmascript.ast.EcmascriptParser#getSuppressMap() %}
* {% jdoc !!core::lang.rule.ParametricRuleViolation %}
* {% jdoc !!core::lang.ParserOptions#suppressMarker %}
### External Contributions

View File

@ -11,6 +11,10 @@ package net.sourceforge.pmd.lang;
* {@link Object#hashCode()}.
*/
public class ParserOptions {
/**
* @deprecated Use {@link #getSuppressMarker()} instead.
*/
@Deprecated
protected String suppressMarker;
public String getSuppressMarker() {

View File

@ -10,10 +10,16 @@ import java.util.regex.Pattern;
import net.sourceforge.pmd.Rule;
import net.sourceforge.pmd.RuleContext;
import net.sourceforge.pmd.RuleViolation;
import net.sourceforge.pmd.annotation.InternalApi;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.properties.PropertyDescriptor;
import net.sourceforge.pmd.util.StringUtil;
/**
* @deprecated This is internal. Clients should exclusively use {@link RuleViolation}.
*/
@Deprecated
@InternalApi
public class ParametricRuleViolation<T extends Node> implements RuleViolation {
protected final Rule rule;