From 66d0bdab0c808e6e753fe26489135b8ffe71cf8c Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Mon, 9 May 2016 10:51:50 +0100 Subject: [PATCH] review comments --- .../java/org/elasticsearch/index/mapper/DocumentParser.java | 4 ---- 1 file changed, 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 9967b087f86..2e73223205a 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java @@ -853,9 +853,7 @@ final class DocumentParser { private static Tuple getDynamicParentMapper(ParseContext context, final String[] paths, ObjectMapper currentParent) { ObjectMapper mapper = currentParent == null ? context.root() : currentParent; - ObjectMapper[] mappers = new ObjectMapper[paths.length-1]; int pathsAdded = 0; - if (paths.length > 1) { ObjectMapper parent = mapper; for (int i = 0; i < paths.length-1; i++) { mapper = context.docMapper().objectMappers().get(context.path().pathAsText(paths[i])); @@ -886,10 +884,8 @@ final class DocumentParser { } context.path().add(paths[i]); pathsAdded++; - mappers[i] = mapper; parent = mapper; } - } return new Tuple(pathsAdded, mapper); }