Fixed advanced find tags' panic arg

This commit is contained in:
Vhati 2013-09-14 22:11:50 -04:00
parent eeb9587657
commit 9de8677cc1
2 changed files with 5 additions and 4 deletions

View file

@ -2,6 +2,7 @@ Changelog
???:
- Added "Return FTL to an unmodded state before switching to a new version"
- Fixed advanced find tags' panic arg (was "true" all the time)
- Fixed perpetually green "Update" button
1.2:

View file

@ -124,7 +124,7 @@ public class XMLPatcher {
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
}
}
if ( matchedNodes.isEmpty() )
if ( panic && matchedNodes.isEmpty() )
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
result = matchedNodes;
@ -175,7 +175,7 @@ public class XMLPatcher {
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
}
}
if ( matchedNodes.isEmpty() )
if ( panic && matchedNodes.isEmpty() )
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
result = matchedNodes;
@ -226,7 +226,7 @@ public class XMLPatcher {
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
}
}
if ( matchedNodes.isEmpty() )
if ( panic && matchedNodes.isEmpty() )
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
result = matchedNodes;
@ -257,7 +257,7 @@ public class XMLPatcher {
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
}
}
if ( matchedNodes.isEmpty() )
if ( panic && matchedNodes.isEmpty() )
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
result = matchedNodes;