-
Bug
-
Resolution: Done
-
Major
-
jBPM 3.0.1, jBPM 3.0.2
-
None
The method findNextDayPart produces an infinite loop if the date in the argument has its hours and minutes outisde of business hours. This can be fixed by the following change:
public DayPart findNextDayPart(Date date) {
DayPart nextDayPart = null;
while(nextDayPart==null) {
nextDayPart = findDayPart(date);
if (nextDayPart==null)
}
return nextDayPart;
}
Furthermore the method isInBusinessHours is wrongly implemented; the use of findNextDayPart would always lead to a result of true (if findNextDayPart would work). This failure can be fixed as follows:
public boolean isInBusinessHours(Date date)
{ return (findDayPart(date)!=null); }