mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GT-2961 - CategoryPath revert change and supply fix.
This commit is contained in:
parent
f62b220e09
commit
860fe5a2d7
1 changed files with 7 additions and 9 deletions
|
@ -288,17 +288,15 @@ public class CategoryPath implements Comparable<CategoryPath> {
|
|||
*/
|
||||
@Override
|
||||
public int compareTo(CategoryPath other) {
|
||||
CategoryPath otherParent = other.getParent();
|
||||
if (parent == null) {
|
||||
if (otherParent != null) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (otherParent == null) {
|
||||
return 1;
|
||||
if (isRoot() && other.isRoot()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int result = parent.compareTo(otherParent);
|
||||
if (isRoot() || other.isRoot()) {
|
||||
return isRoot() ? -1 : 1;
|
||||
}
|
||||
|
||||
int result = parent.compareTo(other.getParent());
|
||||
|
||||
if (result == 0) {
|
||||
result = name.compareTo(other.getName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue