Modify the implementation of method compareTo.
This commit is contained in:
@@ -18,8 +18,8 @@ public class HierarchicalActionSet implements Comparable<HierarchicalActionSet>
|
|||||||
private Action action;
|
private Action action;
|
||||||
private Action parentAction;
|
private Action parentAction;
|
||||||
private String actionString;
|
private String actionString;
|
||||||
private int startPosition;
|
private Integer startPosition;
|
||||||
private int length;
|
private Integer length;
|
||||||
private int bugStartLineNum = 0;
|
private int bugStartLineNum = 0;
|
||||||
private int bugEndLineNum;
|
private int bugEndLineNum;
|
||||||
private int fixStartLineNum;
|
private int fixStartLineNum;
|
||||||
@@ -192,7 +192,11 @@ public class HierarchicalActionSet implements Comparable<HierarchicalActionSet>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(HierarchicalActionSet o) {
|
public int compareTo(HierarchicalActionSet o) {
|
||||||
return this.action.compareTo(o.action);
|
// int result = this.startPosition.compareTo(o.startPosition);
|
||||||
|
// if (result == 0) {
|
||||||
|
// result = this.length >= o.length ? -1 : 1;
|
||||||
|
// }
|
||||||
|
return this.startPosition.compareTo(o.startPosition);//this.action.compareTo(o.action);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> strList = new ArrayList<>();
|
private List<String> strList = new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user