Protect against effortDuration being null.
Use always getter to protect against this possibility. The problem must lie in a IntraDayDate created as result of a migration such that the column for effortDuration is null. Otherwise a newly created IntraDayDate never has a null effortDuration. FEA: ItEr61S05BugFixing
This commit is contained in:
parent
c898f92818
commit
cd065cbc14
1 changed files with 2 additions and 2 deletions
|
|
@ -82,7 +82,7 @@ public class IntraDayDate implements Comparable<IntraDayDate> {
|
|||
}
|
||||
|
||||
public boolean isStartOfDay() {
|
||||
return effortDuration.isZero();
|
||||
return getEffortDuration().isZero();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -118,7 +118,7 @@ public class IntraDayDate implements Comparable<IntraDayDate> {
|
|||
public int compareTo(IntraDayDate other) {
|
||||
int result = date.compareTo(other.date);
|
||||
if (result == 0) {
|
||||
result = effortDuration.compareTo(other.effortDuration);
|
||||
result = getEffortDuration().compareTo(other.getEffortDuration());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue