This commit is contained in:
@@ -400,9 +400,8 @@ public abstract class NodeServer {
|
||||
Collections.sort(swlist, (o1, o2) -> {
|
||||
Priority p1 = o1.getClass().getAnnotation(Priority.class);
|
||||
Priority p2 = o2.getClass().getAnnotation(Priority.class);
|
||||
int v1 = p1 == null ? 0 : p1.value();
|
||||
int v2 = p2 == null ? 0 : p2.value();
|
||||
if (v1 != v2) return v1 - v2;
|
||||
int v = (p2 == null ? 0 : p2.value()) - (p1 == null ? 0 : p1.value());
|
||||
if (v != 0) return v;
|
||||
int rs = Sncp.getResourceType(o1).getName().compareTo(Sncp.getResourceType(o2).getName());
|
||||
if (rs == 0) rs = Sncp.getResourceName(o1).compareTo(Sncp.getResourceName(o2));
|
||||
return rs;
|
||||
|
||||
Reference in New Issue
Block a user