Skip to content

Commit

Permalink
(#3054) Do not crash on invalid offset time
Browse files Browse the repository at this point in the history
We just carry on as if nothing happened
  • Loading branch information
squaregoldfish committed Jan 13, 2025
1 parent f81a7d4 commit 39d0cf6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ protected String getArray(SensorOffsets sensorOffsets,
}

protected Double getFirstSeriesValue(LocalDateTime time) {
return data.get(time).getFirst();
Tuple tuple = data.get(time);
return null == tuple ? Double.NaN : tuple.getFirst();
}

protected Double getSecondSeriesValue(LocalDateTime time) {
return data.get(time).getSecond();
Tuple tuple = data.get(time);
return null == tuple ? Double.NaN : tuple.getSecond();
}

/**
Expand Down

0 comments on commit 39d0cf6

Please sign in to comment.