summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-01-13 12:00:56 +0100
committerGitHub <noreply@github.com>2020-01-13 12:00:56 +0100
commit4e2478aabcd2ed3945ac0294cefd2cf325e39bbf (patch)
tree7b4b418dba84bf389f35a42c168dfb651b3344b0 /config-model/src/main/java
parent4976b922193b1071db4711328caf31bc54e1a0d1 (diff)
parent24c92778445b404dd35056ef4e1f5c89dabaf275 (diff)
Merge pull request #11754 from vespa-engine/mpolden/handle-cluster-without-id
Do not detect ID-less content cluster as combined
Diffstat (limited to 'config-model/src/main/java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java
index f221b1974d7..e72e05a6ebc 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java
@@ -289,12 +289,13 @@ public class NodesSpecification {
var content = findParentByTag("content", element);
if (content.isEmpty()) return false;
- var clusterId = content.get().getAttribute("id");
+ var contentClusterId = content.get().getAttribute("id");
+ if (contentClusterId.isEmpty()) return false;
for (var rootChild : XML.getChildren(services.get())) {
if (!"container".equals(rootChild.getTagName())) continue; // Only container can reference content
var nodes = XML.getChild(rootChild, "nodes");
if (nodes == null) continue;
- if (!clusterId.equals(nodes.getAttribute("of"))) continue;
+ if (!contentClusterId.equals(nodes.getAttribute("of"))) continue;
return true;
}
return false;