Make nodes with more contexts take priority over nodes with less

This commit is contained in:
Luck committed 2016-11-06 16:15:45 +00:00
1 parent 6cd8593fa5
commit 8d5398b5a3
1 file changed
+4
@@ -66,6 +66,10 @@ public class PriorityComparator implements Comparator<LocalizedNode> {
return o1.isWorldSpecific() ? 1 : -1;
}
if (o1.getContexts().size() != o2.getContexts().size()) {
return o1.getContexts().size() > o2.getContexts().size() ? 1 : -1;
}
if (o1.isTemporary() != o2.isTemporary()) {
return o1.isTemporary() ? 1 : -1;
}