For TrackStatisticsUpdater there may no pre-existing Statistics.

This commit is contained in:
Dennis Guse
2025-11-22 13:14:50 +01:00
parent e6bdc9a41d
commit 92cecb6f3a
3 changed files with 9 additions and 15 deletions
@@ -70,7 +70,9 @@ public record Statistics(
*/
//TODO Should be refactored to append only
@NonNull
public Statistics merge(@NonNull Statistics other) {
public Statistics merge(Statistics other) {
if (other == null) return this;
HeartRate newAvgHeartRate = avgHeartRate;
if (avgHeartRate == null) {
newAvgHeartRate = other.avgHeartRate;