mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-05 03:43:52 +00:00
Make sure to correctly check for null for the time point
This commit is contained in:
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);
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user