bug fix: //ConditionalExpression//ConditionalExpression raised a java.lang.StringIndexOutOfBoundsException

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4897 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Xavier Le Vourch
2006-12-19 19:19:13 +00:00
parent fd96acd61d
commit 463bd02c30

View File

@ -44,7 +44,7 @@ public class XPathRule extends CommonAbstractRule {
}
String tail = part.replaceFirst("^//\\w+", "");
String nodeName = part.substring(2, part.indexOf(tail));
String nodeName = part.substring(2, part.indexOf(tail, 2));
return DynamicXPathRule.loadClass(classloader, nodeName);
}