Make nodes with more contexts take priority over nodes with less

This commit is contained in:
Luck 2016-11-06 16:15:45 +00:00
parent 6cd8593fa5
commit 8d5398b5a3
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -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;
}