mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-18 18:20:58 +00:00
avoid NPE by comparing Boolean to Boolean.TRUE, avoiding auto-unboxing of null value
This commit is contained in:
1 parent
3696888b98
commit
a865100dda
1 file changed
+1
-1
+1
-1
@@ -190,7 +190,7 @@ public class CandidateChooserImpl implements CandidateChooser {
|
||||
// a start edge: determine a probability not based on distance traveled but based on the
|
||||
// time difference between scheduled start time and candidate's time point
|
||||
final double estimatedDistanceProbability;
|
||||
if (isGateStart==true || early.getTimePoint() == null) { // TODO for gate start read gate timing and scale probability accordingly
|
||||
if (isGateStart==Boolean.TRUE || early.getTimePoint() == null) { // TODO for gate start read gate timing and scale probability accordingly
|
||||
estimatedDistanceProbability = 1; // no start time point known; all candidate time points equally likely
|
||||
} else {
|
||||
final Duration timeGapBetweenStartOfRaceAndCandidateTimePoint = early.getTimePoint().plus(MILLISECONDS_BEFORE_STARTTIME).until(late.getTimePoint());
|
||||
|
||||
Reference in new issue
Block a user