Fix measurement-list without endtime option fails

Change-Id: Idfbb5eacc196cbebe9e0dea4f10715093e95cbe5
Closes-Bug: #1523354
This commit is contained in:
Shinya Kawabata 2015-12-07 15:10:05 +09:00
parent 86c6d55af7
commit a4e3cbf859
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ public final class Validation {
* @throws WebApplicationException if the {@code startTime} or {@code endTime} are invalid
*/
public static void validateTimes(DateTime startTime, DateTime endTime) {
if (!startTime.isBefore(endTime))
if (endTime != null && !startTime.isBefore(endTime))
throw Exceptions.badRequest("start_time (%s) must be before end_time (%s)", startTime, endTime);
}