diff options
Diffstat (limited to 'config-model/src')
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 {} |