getDayEnd will have a null pointer exception when the offset is not provided. This can cause very strange behaviour in the system when people forget to enter a value in terms. When not provided zero is assumed now
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1205710 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -823,6 +823,9 @@ public class UtilDateTime {
|
||||
}
|
||||
|
||||
public static Timestamp getDayEnd(Timestamp stamp, Long daysLater, TimeZone timeZone, Locale locale) {
|
||||
if (daysLater == null) {
|
||||
daysLater = Long.valueOf(0);
|
||||
}
|
||||
Calendar tempCal = toCalendar(stamp, timeZone, locale);
|
||||
tempCal.set(tempCal.get(Calendar.YEAR), tempCal.get(Calendar.MONTH), tempCal.get(Calendar.DAY_OF_MONTH), 23, 59, 59);
|
||||
tempCal.add(Calendar.DAY_OF_MONTH, daysLater.intValue());
|
||||
|
||||
Reference in New Issue
Block a user