Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2014-11-20 15:48:35 +0000
committerJoakim Erdfelt2014-11-20 15:48:35 +0000
commit1604cffc0b773ef46a6412669846fe3295adbc30 (patch)
tree04ed4db12e6868a445b710a0e126b8fbbee218a3 /jetty-start
parent9bd0ce1938ede1b44ae580e66e0f688a1912b1d4 (diff)
downloadorg.eclipse.jetty.project-1604cffc0b773ef46a6412669846fe3295adbc30.tar.gz
org.eclipse.jetty.project-1604cffc0b773ef46a6412669846fe3295adbc30.tar.xz
org.eclipse.jetty.project-1604cffc0b773ef46a6412669846fe3295adbc30.zip
Fixing HowUniquePredicate
Diffstat (limited to 'jetty-start')
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/graph/HowUniquePredicate.java18
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/DistTest.java1
2 files changed, 14 insertions, 5 deletions
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/graph/HowUniquePredicate.java b/jetty-start/src/main/java/org/eclipse/jetty/start/graph/HowUniquePredicate.java
index d91dfbd10c..b723dbd9ea 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/graph/HowUniquePredicate.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/graph/HowUniquePredicate.java
@@ -34,20 +34,30 @@ public class HowUniquePredicate implements Predicate
@Override
public boolean match(Node<?> node)
{
+ if (node.getSelections().isEmpty())
+ {
+ // Empty selection list (no uniqueness to it)
+ return false;
+ }
+
+ // Assume no match
boolean ret = false;
-
+
for (Selection selection : node.getSelections())
{
if (how.equalsIgnoreCase(selection.getHow()))
{
+ // Found a match
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;
}
} \ No newline at end of file
diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/DistTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/DistTest.java
index ec330467d5..62ece208ba 100644
--- a/jetty-start/src/test/java/org/eclipse/jetty/start/DistTest.java
+++ b/jetty-start/src/test/java/org/eclipse/jetty/start/DistTest.java
@@ -160,7 +160,6 @@ public class DistTest
execMain(cmds);
Path startIni = basePath.resolve("start.ini");
-
assertThat("start.ini", startIni, fileExists());
// Now add 'deploy' module.

Back to the top