mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-07 17:15:59 +00:00
changed order for compare instead of negating result (Spotbugs RV_NEGATING_RESULT_OF_COMPARETO)
This commit is contained in:
1 parent
22222f4c69
commit
d408627e9f
2 files changed
+3
-3
No files matched your search
@@ -1059,8 +1059,8 @@ public class Functions {
|
||||
}
|
||||
|
||||
public int compareTo(Tag that) {
|
||||
int r = Double.compare(this.ordinal, that.ordinal);
|
||||
if (r!=0) return -r; // descending for ordinal
|
||||
int r = Double.compare(that.ordinal, this.ordinal);
|
||||
if (r!=0) return r; // descending for ordinal by reversing the order for compare
|
||||
return this.hierarchy.compareTo(that.hierarchy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user