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:
Ryan Gustafson
2008-06-30 05:05:51 +00:00
parent b35f990933
commit 8913660672

View File

@ -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;
}