mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-21 11:40:01 +00:00
Fix a bug in the instrumentation for strange race times
This commit is contained in:
1 parent
a3c7a19616
commit
79277f2179
1 file changed
+6
-5
+6
-5
@@ -1428,18 +1428,19 @@ public class SailingServiceImpl extends RemoteServiceServlet implements SailingS
|
||||
|
||||
// special instrumentation for strange race times
|
||||
if (raceTimesInfo.startOfTracking != null) {
|
||||
Date earliest = raceTimesInfo.startOfTracking;
|
||||
long earliestInMs = raceTimesInfo.startOfTracking.getTime();
|
||||
long timeToCheck = 24*3600*1000; // 24h
|
||||
boolean allDatesWithin24h = true;
|
||||
if (raceTimesInfo.startOfRace != null && Math.abs(raceTimesInfo.startOfRace.getTime()-earliest.getTime())<24*3600*1000) {
|
||||
if (raceTimesInfo.startOfRace != null && Math.abs(raceTimesInfo.startOfRace.getTime()-earliestInMs)>timeToCheck) {
|
||||
allDatesWithin24h = false;
|
||||
}
|
||||
if (raceTimesInfo.newestTrackingEvent != null && Math.abs(raceTimesInfo.newestTrackingEvent.getTime()-earliest.getTime())<24*3600*1000) {
|
||||
if (raceTimesInfo.newestTrackingEvent != null && Math.abs(raceTimesInfo.newestTrackingEvent.getTime()-earliestInMs)>timeToCheck) {
|
||||
allDatesWithin24h = false;
|
||||
}
|
||||
if (raceTimesInfo.endOfTracking != null && Math.abs(raceTimesInfo.endOfTracking.getTime()-earliest.getTime())<24*3600*1000) {
|
||||
if (raceTimesInfo.endOfTracking != null && Math.abs(raceTimesInfo.endOfTracking.getTime()-earliestInMs)>timeToCheck) {
|
||||
allDatesWithin24h = false;
|
||||
}
|
||||
if (raceTimesInfo.endOfRace != null && Math.abs(raceTimesInfo.endOfRace.getTime()-earliest.getTime())<24*3600*1000) {
|
||||
if (raceTimesInfo.endOfRace != null && Math.abs(raceTimesInfo.endOfRace.getTime()-earliestInMs)>timeToCheck) {
|
||||
allDatesWithin24h = false;
|
||||
}
|
||||
if (!allDatesWithin24h) {
|
||||
|
||||
Reference in new issue
Block a user