mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 22:15:26 +00:00
avoid NPE when TracTrac official result reconciler isn't used
This commit is contained in:
1 parent
f7c47dd479
commit
567908d36d
2 files changed
+16
-13
No files matched your search
+2
-1
@@ -216,6 +216,7 @@ public class RaceTrackingConnectivityParametersImpl extends AbstractRaceTracking
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName()+" for "+paramURL+", liveURI: "+liveURI+", storedURI: "+storedURI;
|
||||
return getClass().getSimpleName() + " for " + paramURL + ", liveURI: " + liveURI + ", storedURI: " + storedURI
|
||||
+ ", useOfficialEventsToUpdateRaceLog: " + useOfficialEventsToUpdateRaceLog;
|
||||
}
|
||||
}
|
||||
+14
-12
@@ -708,19 +708,21 @@ public class TracTracRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
* to all those race logs for events that may require reconciliation of results, race and competitor statuses.
|
||||
*/
|
||||
private void registerRaceAndCompetitorStatusWithRaceLogReconciler(final DynamicTrackedRace trackedRace) {
|
||||
trackedRace.addListener(new AbstractRaceChangeListener() {
|
||||
@Override
|
||||
public void raceLogAttached(RaceLog raceLog) {
|
||||
reconciler.raceLogAttached(trackedRace, raceLog);
|
||||
if (reconciler != null) {
|
||||
trackedRace.addListener(new AbstractRaceChangeListener() {
|
||||
@Override
|
||||
public void raceLogAttached(RaceLog raceLog) {
|
||||
reconciler.raceLogAttached(trackedRace, raceLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void raceLogDetached(RaceLog raceLog) {
|
||||
reconciler.raceLogDetached(trackedRace, raceLog);
|
||||
}
|
||||
});
|
||||
for (final RaceLog alreadyAttachedRaceLog : trackedRace.getAttachedRaceLogs()) {
|
||||
reconciler.raceLogAttached(trackedRace, alreadyAttachedRaceLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void raceLogDetached(RaceLog raceLog) {
|
||||
reconciler.raceLogDetached(trackedRace, raceLog);
|
||||
}
|
||||
});
|
||||
for (final RaceLog alreadyAttachedRaceLog : trackedRace.getAttachedRaceLogs()) {
|
||||
reconciler.raceLogAttached(trackedRace, alreadyAttachedRaceLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user