Fixed advanced find tags not honoring start= when greater than match count
This commit is contained in:
parent
6f3d434046
commit
3c17ccc39d
2 changed files with 14 additions and 1 deletions
|
@ -130,6 +130,9 @@ public class XMLPatcher {
|
|||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||
}
|
||||
}
|
||||
else {
|
||||
matchedNodes.clear();
|
||||
}
|
||||
if ( panic && matchedNodes.isEmpty() )
|
||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||
|
||||
|
@ -182,6 +185,9 @@ public class XMLPatcher {
|
|||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||
}
|
||||
}
|
||||
else {
|
||||
matchedNodes.clear();
|
||||
}
|
||||
if ( panic && matchedNodes.isEmpty() )
|
||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||
|
||||
|
@ -234,6 +240,9 @@ public class XMLPatcher {
|
|||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||
}
|
||||
}
|
||||
else {
|
||||
matchedNodes.clear();
|
||||
}
|
||||
if ( panic && matchedNodes.isEmpty() )
|
||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||
|
||||
|
@ -266,6 +275,9 @@ public class XMLPatcher {
|
|||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||
}
|
||||
}
|
||||
else {
|
||||
matchedNodes.clear();
|
||||
}
|
||||
if ( panic && matchedNodes.isEmpty() )
|
||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue