Merge branch 'deprecations-for-2807'

[core] Deprecations for ParametricRuleViolation and ParserOptions#suppressMarker #2907
This commit is contained in:
Clément Fournier
2020-11-08 09:03:26 +01:00
4 changed files with 20 additions and 0 deletions

View File

@ -38,6 +38,9 @@ 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 %}
* {% jdoc !!modelica::lang.modelica.rule.ModelicaRuleViolationFactory %}
### 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;

View File

@ -7,10 +7,17 @@ package net.sourceforge.pmd.lang.modelica.rule;
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.lang.rule.AbstractRuleViolationFactory;
import net.sourceforge.pmd.lang.rule.ParametricRuleViolation;
import net.sourceforge.pmd.lang.rule.RuleViolationFactory;
/**
* @deprecated See {@link RuleViolationFactory}
*/
@Deprecated
@InternalApi
public final class ModelicaRuleViolationFactory extends AbstractRuleViolationFactory {
public static final ModelicaRuleViolationFactory INSTANCE = new ModelicaRuleViolationFactory();