-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[core] Deprecate support for List attributes with XPath 2.0 #2451
Copy link
Copy link
Closed
Labels
in:xpathRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolutionRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolutionis:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing themThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them
Milestone
Metadata
Metadata
Assignees
Labels
in:xpathRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolutionRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolutionis:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing themThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them
Type
Fields
Give feedbackNo fields configured for issues without a type.
Part of #2523
When we update Saxon on PMD 7, attributes of type List (
List<String>) won't work anymore, since with newer Saxon versions, attributes are supposed to be always non-sequences.That's why we should deprecate the usage of such attributes for XPath (via
@DeprecatedAttribute).Affects PMD Version: 6.x + 7
Affected Attributes:
I grepped our code (
find -wholename "*/lang/*/ast/*.java"|grep -i -v test|grep -v generated-sources | xargs grep "List<") and found only these usages:All are in Apex and could be potentially used by some XPath 2.0 rule. (TriggerUsage is a enum). I didn't find any usage of these getters/attributes in our apex rules.
Note
net.sourceforge.pmd.lang.ast.xpath.DocumentNavigator.ListFilteringAttributeIterator).Proposed Steps: