From 7f9d84cb1a31dc1fa0050298688352362675e8e6 Mon Sep 17 00:00:00 2001 From: Koen De Groote Date: Thu, 27 Apr 2017 00:54:23 +0200 Subject: [PATCH] The parseObject method in DocumentParse can be void. There is no point in the code that actually expects the return, plus the variable created for it was never actually used. (#24350) --- .../java/org/elasticsearch/index/mapper/DocumentParser.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java b/core/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java index 5ec1eab2115..489f4702bc3 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java @@ -455,10 +455,9 @@ final class DocumentParser { } } - private static ObjectMapper parseObject(final ParseContext context, ObjectMapper mapper, String currentFieldName) throws IOException { + private static void parseObject(final ParseContext context, ObjectMapper mapper, String currentFieldName) throws IOException { assert currentFieldName != null; - ObjectMapper update = null; Mapper objectMapper = getMapper(mapper, currentFieldName); if (objectMapper != null) { context.path().add(currentFieldName); @@ -492,8 +491,6 @@ final class DocumentParser { context.path().remove(); } } - - return update; } private static void parseArray(ParseContext context, ObjectMapper parentMapper, String lastFieldName) throws IOException {