Skip to content

Commit 5fe7b7f

Browse files
authored
Minor fix in dynamic template validation (elastic#66166)
As part of elastic#66156 the validation of dynamic templates has been adapted to support runtime fields. As part of that change, a `break` was forgotten, which causes needless additional validation rounds after a template has been already successfully validated against one of the field types.
1 parent b4790ed commit 5fe7b7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/main/java/org/elasticsearch/index/mapper/RootObjectMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ private static void validateDynamicTemplate(Mapper.TypeParser.ParserContext pars
426426
(name, mapping) -> typeParser.parse(name, mapping, parserContext).build(new ContentPath(1)));
427427
}
428428
dynamicTemplateInvalid = false;
429+
break;
429430
} catch(Exception e) {
430431
lastError = e;
431432
}

0 commit comments

Comments
 (0)