use of io.spine.option.Time in project core-java by SpineEventEngine.
the class MessageFieldValidator method validateTimestamps.
private void validateTimestamps() {
final Time when = timeOption.getIn();
if (when == TIME_UNDEFINED) {
return;
}
final Timestamp now = getCurrentTime();
for (Message value : getValues()) {
final Timestamp time = (Timestamp) value;
if (isTimeInvalid(time, when, now)) {
addViolation(newTimeViolation(time));
// return because one error message is enough for the "time" option
return;
}
}
}
Aggregations