[core] Remove XPathRule#XPATH_DESCRIPTOR

This commit is contained in:
Andreas Dangel 2024-02-08 08:37:41 +01:00
parent cdc70c633a
commit 90ab50ca29
No known key found for this signature in database
GPG Key ID: 93450DF2DF9A3FA3
3 changed files with 4 additions and 6 deletions

View File

@ -215,6 +215,8 @@ The following previously deprecated rules have been finally removed:
* {%jdoc !!core::lang.rule.RuleReference %} - the following methods have been removed:
* `setRuleSetReference(RuleSetReference)` - without replacement. Just construct new {%jdoc core::lang.rule.RuleReference %} instead.
* `hasOverriddenProperty(PropertyDescriptor)` - use {%jdoc core::lang.rule.RuleReference#isPropertyOverridden(core::properties.PropertyDescriptor) %} instead.
* {%jdoc !!core::lang.rule.XPathRule %}
* The constant `XPATH_DESCRIPTOR` has been made private and is not accessible anymore.
* pmd-apex
* {%jdoc apex::lang.apex.ast.ApexNode %} and {% jdoc apex::lang.apex.ast.ASTApexFile %}
* `#getApexVersion()`: In PMD 6, this method has been deprecated but was defined in the class `ApexRootNode`.

View File

@ -38,11 +38,7 @@ public final class XPathRule extends AbstractRule {
// TODO move to XPath subpackage
/**
* @deprecated Use {@link #XPathRule(XPathVersion, String)}
*/
@Deprecated
public static final PropertyDescriptor<String> XPATH_DESCRIPTOR =
private static final PropertyDescriptor<String> XPATH_DESCRIPTOR =
PropertyFactory.stringProperty("xpath")
.desc("XPath expression")
.defaultValue("")

View File

@ -436,7 +436,7 @@ public class RuleDocGenerator {
// filter out standard properties
properties.remove(Rule.VIOLATION_SUPPRESS_REGEX_DESCRIPTOR);
properties.remove(Rule.VIOLATION_SUPPRESS_XPATH_DESCRIPTOR);
properties.remove(XPathRule.XPATH_DESCRIPTOR);
properties.removeIf(p -> "xpath".equals(p.name())); // this is XPathRule.XPATH_DESCRIPTOR
properties.remove(XPathRule.VERSION_DESCRIPTOR);
if (!properties.isEmpty()) {