Inline silly method
FEA: ItEr74S04BugFixing
This commit is contained in:
parent
d7099386d0
commit
e5fe70f03d
1 changed files with 2 additions and 12 deletions
|
|
@ -94,26 +94,16 @@ public class LoadPeriod {
|
|||
throw new IllegalArgumentException(o1 + " overlaps with "
|
||||
+ o2);
|
||||
}
|
||||
int comparison = compareLocalDates(o1.start, o2.start);
|
||||
int comparison = o1.start.compareTo(o2.start);
|
||||
if (comparison != 0) {
|
||||
return comparison;
|
||||
}
|
||||
return compareLocalDates(o1.end, o2.end);
|
||||
return o1.end.compareTo(o2.end);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static int compareLocalDates(LocalDate l1, LocalDate l2) {
|
||||
if (l1.isBefore(l2)) {
|
||||
return -1;
|
||||
}
|
||||
if (l1.isAfter(l2)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue