Make sure to correctly check for null for the time point

This commit is contained in:
Simon Pamies authored and Axel Uhl committed 2013-06-27 14:04:43 +02:00
1 parent 738416ccfc
commit d14607ab78
2 files changed
+4 -1

No files matched your search

@@ -107,6 +107,9 @@ public interface TrackedRace extends Serializable {
* {@link TimingConstants#IS_LIVE_GRACE_PERIOD_IN_MILLIS} is added to that to mark the end of the "live" interval.
* <p>
*
* @param at
* the time point at which to determine whether the race for <code>fleet</code>
* is/was live. A <code>null</code> value will use the start time of the race.
* @return
*/
boolean isLive(TimePoint at);
@@ -657,7 +657,7 @@ public abstract class TrackedRaceImpl implements TrackedRace, CourseListener {
}
// if an empty timepoint is given then take the start of the race
if (at.asMillis() == 0) {
if (at == null) {
at = new MillisecondsTimePoint(startOfLivePeriod.getTime()+1);
}