From 1a067c569c4daf55c23c89f60fae38e8759bc3b9 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Sun, 17 Mar 2024 12:32:56 +0100 Subject: Revert "Check that schema exists first." --- .../java/com/yahoo/vespa/model/content/ContentSearchCluster.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java index 378907eafd7..01708333ed5 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java @@ -314,14 +314,12 @@ public class ContentSearchCluster extends TreeConfigProducer private boolean hasIndexingModeStreaming(NewDocumentType type) { if (indexedCluster == null) return false; - var schemaInfo = indexedCluster.schemas().get(type.getName()); - return (schemaInfo != null) && (schemaInfo.getIndexMode() == SchemaInfo.IndexMode.STREAMING); + return indexedCluster.schemas().get(type.getName()).getIndexMode() == SchemaInfo.IndexMode.STREAMING; } private boolean hasIndexingModeIndexed(NewDocumentType type) { if (indexedCluster == null) return false; - var schemaInfo = indexedCluster.schemas().get(type.getName()); - return (schemaInfo != null) && (schemaInfo.getIndexMode() == SchemaInfo.IndexMode.INDEX); + return indexedCluster.schemas().get(type.getName()).getIndexMode() == SchemaInfo.IndexMode.INDEX; } private boolean hasIndexingModeStoreOnly(NewDocumentType type) { -- cgit v1.2.3