We need a mutable set here
@@ -6,7 +6,7 @@ import static com.hubspot.blazar.externalservice.BuildClusterService.BuildContai
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -103,7 +103,7 @@ public class BuildClusterService {
* @throws NonRetryableBuildException
*/
public synchronized void launchBuildContainer(ModuleBuild moduleBuild) throws BuildClusterException {
- Optional<String> clusterToUse = pickClusterToLaunchBuild(moduleBuild, Collections.emptySet());
+ Optional<String> clusterToUse = pickClusterToLaunchBuild(moduleBuild, new HashSet<>());
if (!clusterToUse.isPresent()) {
String message = String.format("Could not find a cluster to launch module build %d", moduleBuild.getId().get());
LOG.warn(message);
