Skip to content

Commit 45234f4

Browse files
committed
fix compilation warning
1 parent 55cad32 commit 45234f4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonMapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
@ThreadSafe
3434
public interface JsonMapper extends ToJson {
3535

36+
public static final JsonMapper[] EMPTY_ARRAY = new JsonMapper[0];
37+
3638
@NotThreadSafe
3739
public static class BuilderContext {
3840
private final JsonPath jsonPath;

modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/json/JsonObjectMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ private void serializeValue(JsonParseContext jsonContext, String currentFieldNam
411411
}
412412

413413
@Override public void toJson(JsonBuilder builder, Params params) throws IOException {
414-
toJson(builder, params, null);
414+
toJson(builder, params, JsonMapper.EMPTY_ARRAY);
415415
}
416416

417417
public void toJson(JsonBuilder builder, Params params, JsonMapper... additionalMappers) throws IOException {

0 commit comments

Comments
 (0)