use a synchronized set to fix bug 2973; however, now I'm seeing a NPE at a different spot. Related?

This commit is contained in:
Axel Uhl committed 2015-06-18 00:22:08 +02:00
1 parent 39573c8928
commit 39baea5873
1 file changed
+2 -1
@@ -2,6 +2,7 @@ package com.sap.sailing.domain.markpassingcalculation.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
@@ -76,7 +77,7 @@ public class CandidateChooserImpl implements CandidateChooser {
candidates = new HashMap<>();
List<Candidate> startAndEnd = Arrays.asList(start, end);
for (Competitor c : race.getRace().getCompetitors()) {
candidates.put(c, new TreeSet<Candidate>());
candidates.put(c, Collections.synchronizedSet(new TreeSet<Candidate>()));
currentMarkPasses.put(c, new HashMap<Waypoint, MarkPassing>());
TreeSet<Candidate> fixedPasses = new TreeSet<Candidate>(new Comparator<Candidate>() {
@Override