Skip to content

Commit

Permalink
Geo Point parse error fix (#40447)
Browse files Browse the repository at this point in the history
Fixed compilation on 6.7
  • Loading branch information
henningandersen committed Apr 8, 2019
1 parent 57d5312 commit 013a014
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,12 @@ public void testInvalidGeopointValuesIgnored() throws Exception {
.startObject().field("location", "NaN,12").endObject()
), XContentType.JSON)).rootDoc().getField("location"), nullValue());

assertThat(defaultMapper.parse(new SourceToParse("test", "type", "1",
assertThat(defaultMapper.parse(SourceToParse.source("test", "type", "1",
BytesReference.bytes(XContentFactory.jsonBuilder()
.startObject().startObject("location").nullField("lat").field("lon", 1).endObject().endObject()
), XContentType.JSON)).rootDoc().getField("location"), nullValue());

assertThat(defaultMapper.parse(new SourceToParse("test", "type", "1",
assertThat(defaultMapper.parse(SourceToParse.source("test", "type", "1",
BytesReference.bytes(XContentFactory.jsonBuilder()
.startObject().startObject("location").nullField("lat").nullField("lon").endObject().endObject()
), XContentType.JSON)).rootDoc().getField("location"), nullValue());
Expand Down

0 comments on commit 013a014

Please sign in to comment.