Fixing HowUniquePredicate
This commit is contained in:
parent
9bd0ce1938
commit
1604cffc0b
|
@ -34,20 +34,30 @@ public class HowUniquePredicate implements Predicate
|
||||||
@Override
|
@Override
|
||||||
public boolean match(Node<?> node)
|
public boolean match(Node<?> node)
|
||||||
{
|
{
|
||||||
|
if (node.getSelections().isEmpty())
|
||||||
|
{
|
||||||
|
// Empty selection list (no uniqueness to it)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assume no match
|
||||||
boolean ret = false;
|
boolean ret = false;
|
||||||
|
|
||||||
for (Selection selection : node.getSelections())
|
for (Selection selection : node.getSelections())
|
||||||
{
|
{
|
||||||
if (how.equalsIgnoreCase(selection.getHow()))
|
if (how.equalsIgnoreCase(selection.getHow()))
|
||||||
{
|
{
|
||||||
|
// Found a match
|
||||||
ret = true;
|
ret = true;
|
||||||
continue; // this how is always valid.
|
continue; // this 'how' is always valid.
|
||||||
}
|
}
|
||||||
if (selection.isExplicit())
|
else if (selection.isExplicit())
|
||||||
{
|
{
|
||||||
ret = false;
|
// Automatic failure
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -160,7 +160,6 @@ public class DistTest
|
||||||
execMain(cmds);
|
execMain(cmds);
|
||||||
|
|
||||||
Path startIni = basePath.resolve("start.ini");
|
Path startIni = basePath.resolve("start.ini");
|
||||||
|
|
||||||
assertThat("start.ini", startIni, fileExists());
|
assertThat("start.ini", startIni, fileExists());
|
||||||
|
|
||||||
// Now add 'deploy' module.
|
// Now add 'deploy' module.
|
||||||
|
|
Loading…
Reference in New Issue