Skip to content

Commit 4f37b48

Browse files
Cleanup
1 parent 388d023 commit 4f37b48

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/main/java/org/opensearch/index/mapper/DocumentParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ private static void parseArray(ParseContext context, ObjectMapper parentMapper,
672672
parentMapper.fullPath()
673673
);
674674
if (builder == null) {
675-
// no template matches, skip the array
676675
context.parser().skipChildren();
677676
} else {
678677
Mapper.BuilderContext templateBuilderContext = new Mapper.BuilderContext(
@@ -969,7 +968,7 @@ private static void parseDynamicValue(
969968
}
970969
final Mapper.Builder<?> builder = createBuilderFromDynamicValue(context, token, currentFieldName, dynamic, parentMapper.fullPath());
971970
if (dynamic == ObjectMapper.Dynamic.FALSE_ALLOW_TEMPLATES && builder == null) {
972-
// For FALSE_ALLOW_TEMPLATES, if no template matches, we need to consume the token
971+
// For FALSE_ALLOW_TEMPLATES, if no template matches, we still need to consume the token
973972
// to maintain proper JSON parsing state
974973
if (token == XContentParser.Token.START_OBJECT || token == XContentParser.Token.START_ARRAY) {
975974
context.parser().skipChildren();

0 commit comments

Comments
 (0)