forked from phoedos/pmd
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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user