mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 06:49:56 +00:00
fixed order of RawPositionReceiver constructor initialization;
avoiding NPE when listener is fired before lock has been initialized
This commit is contained in:
1 parent
14a0e5bed1
commit
68bccb8ee0
1 file changed
+1
-1
+1
-1
@@ -71,9 +71,9 @@ public class MaxSpeedCache<ItemType, FixType extends GPSFix> implements GPSTrack
|
||||
|
||||
public MaxSpeedCache(GPSFixTrackImpl<ItemType, FixType> track) {
|
||||
this.track = track;
|
||||
track.addListener(this);
|
||||
cache = new HashMap<TimePoint, NavigableSet<Util.Pair<TimePoint, Util.Pair<FixType, Speed>>>>();
|
||||
lock = new NamedReentrantReadWriteLock(MaxSpeedCache.class.getSimpleName()+" for track of "+track.getTrackedItem(), /* fair */ false);
|
||||
track.addListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user