ItEr59S04ValidacionEProbasFuncionaisItEr58S04: [Bug #481] Fixing bug
Start time can be null so taking it into account.
This commit is contained in:
parent
5f3d6fe72d
commit
3fb6c09763
1 changed files with 10 additions and 3 deletions
|
|
@ -226,11 +226,18 @@ public class Gap implements Comparable<Gap> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Gap o) {
|
||||
if (o == null) {
|
||||
public int compareTo(Gap other) {
|
||||
if (other == null) {
|
||||
return 1;
|
||||
}
|
||||
return this.getStartTime().compareTo(o.getStartTime());
|
||||
if (this.getStartTime() == null && other.getStartTime() == null) {
|
||||
return 0;
|
||||
} else if (this.getStartTime() == null) {
|
||||
return -1;
|
||||
} else if (other.getStartTime() == null) {
|
||||
return 1;
|
||||
}
|
||||
return this.getStartTime().compareTo(other.getStartTime());
|
||||
}
|
||||
|
||||
public boolean isBefore(Gap gap) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue