From 129c13bae4afcc3bb924841a6431e9bf7ebd4d4a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 19 Oct 2017 12:16:11 +0200 Subject: Do not crash with technical errors when cluster is enabled --- .../src/main/java/org/sonar/ce/CeDistributedInformationImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server/sonar-ce/src') diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java index 23152f3521a..97b8c2a55b2 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java @@ -25,8 +25,8 @@ import java.util.Set; import java.util.concurrent.locks.Lock; import org.picocontainer.Startable; import org.sonar.ce.taskprocessor.CeWorkerFactory; -import org.sonar.process.cluster.hz.HazelcastObjects; import org.sonar.process.cluster.hz.HazelcastMember; +import org.sonar.process.cluster.hz.HazelcastObjects; import static org.sonar.core.util.stream.MoreCollectors.toSet; import static org.sonar.process.cluster.hz.HazelcastObjects.WORKER_UUIDS; @@ -43,6 +43,10 @@ public class CeDistributedInformationImpl implements CeDistributedInformation, S this.ceCeWorkerFactory = ceCeWorkerFactory; } + public CeDistributedInformationImpl(CeWorkerFactory ceCeWorkerFactory) { + this(null, ceCeWorkerFactory); + } + @Override public Set getWorkerUUIDs() { Set connectedWorkerUUIDs = hazelcastMember.getMemberUuids(); -- cgit v1.2.3