Fixed nullpointer exception on work week date picker

FEA: ItEr70S04BugFixing
This commit is contained in:
Lorenzo Tilve 2011-02-14 11:15:15 +01:00
parent d0cd64c987
commit e56f022cd9

View file

@ -133,9 +133,11 @@ public class EffortDurationPicker extends Hbox {
Integer hoursValue = hours.getValue();
Integer minutesValue = minutes.getValue();
Integer secondsValue = seconds.getValue();
EffortDuration newValue = EffortDuration.hours(hoursValue)
.and(minutesValue, Granularity.MINUTES)
.and(secondsValue, Granularity.SECONDS);
EffortDuration newValue = EffortDuration.hours(
hoursValue != null ? hoursValue : 0).and(
minutesValue != null ? minutesValue : 0, Granularity.MINUTES)
.and(secondsValue != null ? secondsValue : 0,
Granularity.SECONDS);
return newValue;
}