A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/2451 below:

[core] Deprecate support for List attributes with XPath 2.0 · Issue #2451 · pmd/pmd · GitHub

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:

./pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java:51:    public List<String> getNames() {
./pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTUserTrigger.java:41:    public List<TriggerUsage> getUsages() {
./pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTFieldDeclarationStatements.java:62:    public List<String> getTypeArguments() {

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

Proposed Steps:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4