From 20f27818a1ef2ff412bdb51ced433d385f915baa Mon Sep 17 00:00:00 2001 From: Kostas Krikellas Date: Wed, 9 Oct 2024 10:47:16 +0300 Subject: [PATCH] fix list api --- .../org/elasticsearch/index/mapper/DocumentParserContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java index ac236e5a7e5fd..ad22f4917cb79 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java @@ -297,8 +297,8 @@ public final void addIgnoredField(IgnoredSourceFieldMapper.NameValue values) { } final void removeLastIgnoredField(String name) { - if (ignoredFieldValues.isEmpty() == false && ignoredFieldValues.getLast().name().equals(name)) { - ignoredFieldValues.removeLast(); + if (ignoredFieldValues.isEmpty() == false && ignoredFieldValues.get(ignoredFieldValues.size() - 1).name().equals(name)) { + ignoredFieldValues.remove(ignoredFieldValues.size() - 1); } }