summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-03-19 16:00:34 +0100
committerGitHub <noreply@github.com>2018-03-19 16:00:34 +0100
commitc650fe2cef2548f9137e6f7c9214799de144ffc3 (patch)
tree358cd4260652bd1a9cf7cb70c73550c0cc885779
parente73ee36db35b3e80ae4aea4450c45a1c2314e870 (diff)
parentc959fae516b002907d4a638d3f150a9c2d351b02 (diff)
Merge pull request #5385 from vespa-engine/musum/add-guard-for-tenant-not-existing
Add guard for tenant not existing
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
index f9d5e9ba9b9..4a96cfdad87 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
@@ -55,7 +55,6 @@ import java.net.URI;
import java.time.Clock;
import java.time.Duration;
import java.time.Instant;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -153,6 +152,7 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
@Override
public Optional<com.yahoo.config.provision.Deployment> deployFromLocalActive(ApplicationId application, Duration timeout) {
Tenant tenant = tenants.getTenant(application.tenant());
+ if (tenant == null) return Optional.empty();
LocalSession activeSession = getActiveSession(tenant, application);
if (activeSession == null) return Optional.empty();
TimeoutBudget timeoutBudget = new TimeoutBudget(clock, timeout);