forked from phoedos/pmd
Widen return type from Node.findChildNodesWithXPath() to List<? extends Node> from List<Node> allow casting results to a List of subclasses of Node (e.g. List<ASTVariableDeclarator>).
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6303 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -69,7 +69,7 @@ public abstract class AbstractRuleViolation implements RuleViolation {
|
||||
String xpath = rule.getStringProperty(Rule.VIOLATION_SUPPRESS_XPATH_PROPERTY);
|
||||
if (xpath != null) {
|
||||
try {
|
||||
List<Node> children = node.findChildNodesWithXPath(xpath);
|
||||
List<? extends Node> children = node.findChildNodesWithXPath(xpath);
|
||||
if (children != null && !children.isEmpty()) {
|
||||
suppressed = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user