From 45234f4d90a8f2132dc51a506d3cfaf99751ea10 Mon Sep 17 00:00:00 2001 From: kimchy Date: Fri, 19 Mar 2010 14:19:53 +0200 Subject: [PATCH] fix compilation warning --- .../java/org/elasticsearch/index/mapper/json/JsonMapper.java | 2 ++ .../org/elasticsearch/index/mapper/json/JsonObjectMapper.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMapper.java index 4d660916519..83293b8853b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMapper.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMapper.java @@ -33,6 +33,8 @@ import java.io.IOException; @ThreadSafe public interface JsonMapper extends ToJson { + public static final JsonMapper[] EMPTY_ARRAY = new JsonMapper[0]; + @NotThreadSafe public static class BuilderContext { private final JsonPath jsonPath; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java index f0bf7a00e0d..e839d9e0820 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java @@ -411,7 +411,7 @@ public class JsonObjectMapper implements JsonMapper, JsonIncludeInAllMapper { } @Override public void toJson(JsonBuilder builder, Params params) throws IOException { - toJson(builder, params, null); + toJson(builder, params, JsonMapper.EMPTY_ARRAY); } public void toJson(JsonBuilder builder, Params params, JsonMapper... additionalMappers) throws IOException {