summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2022-12-01 14:34:11 +0100
committerGitHub <noreply@github.com>2022-12-01 14:34:11 +0100
commitb607bc63930b3199912ea56c636b90c6f5cd887d (patch)
treec53c2818e637b706e90543d7e6797e6f2ee69d27 /config-model
parent810f89bb2acdef6f8aed630354b945cd9e3e2984 (diff)
parent4226f2d67552c31e07a5be772691be213770a1b7 (diff)
Merge pull request #25074 from vespa-engine/jonmv/fix-endpoint-service-privisioning
Write new settings only on activation
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/HostSystem.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java15
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/InconsistentSchemaAndCodeError.java7
3 files changed, 6 insertions, 18 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/HostSystem.java b/config-model/src/main/java/com/yahoo/vespa/model/HostSystem.java
index fcad1e20c16..2de7e5a1b37 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/HostSystem.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/HostSystem.java
@@ -115,7 +115,7 @@ public class HostSystem extends AbstractConfigProducer<Host> {
return hostResource;
}
- /** Returns the hosts owned by the application having this system - i.e all hosts except config servers */
+ /** Returns the hosts owned by the application having this system - i.e. all hosts except config servers */
public List<HostResource> getHosts() {
return hostname2host.values().stream()
.filter(host -> !host.getHost().runsConfigServer())
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java
index 82b3defa22d..4a264f1eebc 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java
@@ -99,16 +99,11 @@ public class AccessLogBuilder {
}
private static AccessLogType logTypeFor(AccessLogTypeLiteral typeLiteral) {
- switch (typeLiteral) {
- case DISABLED:
- return null;
- case VESPA:
- return AccessLogType.queryAccessLog;
- case JSON:
- return AccessLogType.jsonAccessLog;
- default:
- throw new InconsistentSchemaAndCodeError();
- }
+ return switch (typeLiteral) {
+ case DISABLED -> null;
+ case VESPA -> AccessLogType.queryAccessLog;
+ case JSON -> AccessLogType.jsonAccessLog;
+ };
}
public static Optional<AccessLogComponent> buildIfNotDisabled(DeployState deployState, ContainerCluster<?> cluster, Element accessLogSpec) {
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/InconsistentSchemaAndCodeError.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/InconsistentSchemaAndCodeError.java
deleted file mode 100644
index e3744f23964..00000000000
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/InconsistentSchemaAndCodeError.java
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.model.container.xml;
-
-/**
- * @author Tony Vaagenes
- */
-public class InconsistentSchemaAndCodeError extends Error {}