Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Apr 16, 2024
1 parent cac3d1e commit abd8cad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ public static BiConsumer<String, MappingParserContext> notInMultiFields(String t
};
}

public static BiConsumer<String, MappingParserContext> notDynamicallyCreated(String type) {
public static BiConsumer<String, MappingParserContext> notFromDynamicTemplates(String type) {
return (n, c) -> {
if (c.isFromDynamicTemplate()) {
throw new MapperParsingException("Field [" + n + "] of type [" + type + "] can't be used in dynamic templates");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private static class NonDynamicFieldMapper extends FieldMapper {

private static final TypeParser PARSER = new TypeParser(
(n, c) -> new Builder(n),
List.of(notDynamicallyCreated(NAME), notInMultiFields(NAME))
List.of(notFromDynamicTemplates(NAME), notInMultiFields(NAME))
);

private static class Builder extends FieldMapper.Builder {
Expand Down

0 comments on commit abd8cad

Please sign in to comment.