Revert "Upgrade to Jackson 2.9.2 (#27032)"
This reverts commit 0b9acc5ace
.
This commit is contained in:
parent
f78b2e5bc9
commit
463e7e6fa3
|
@ -5,8 +5,8 @@ lucene = 7.1.0-snapshot-f33ed4ba12a
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
spatial4j = 0.6
|
spatial4j = 0.6
|
||||||
jts = 1.13
|
jts = 1.13
|
||||||
jackson = 2.9.2
|
jackson = 2.8.6
|
||||||
snakeyaml = 1.18
|
snakeyaml = 1.15
|
||||||
# when updating log4j, please update also docs/java-api/index.asciidoc
|
# when updating log4j, please update also docs/java-api/index.asciidoc
|
||||||
log4j = 2.9.1
|
log4j = 2.9.1
|
||||||
slf4j = 1.6.2
|
slf4j = 1.6.2
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
2ef7b1cc34de149600f5e75bc2d5bf40de894e60
|
|
@ -1 +0,0 @@
|
||||||
aed20e50152a2f19adc1995c8d8f307c7efa414d
|
|
|
@ -0,0 +1 @@
|
||||||
|
2ef7b1cc34de149600f5e75bc2d5bf40de894e60
|
|
@ -1 +0,0 @@
|
||||||
aed20e50152a2f19adc1995c8d8f307c7efa414d
|
|
|
@ -0,0 +1 @@
|
||||||
|
b88721371cfa2d7242bb5e52fe70861aa061c050
|
|
@ -1 +0,0 @@
|
||||||
9ad705ca14f5d1879dfffc3d94a521bf2f2e8ea7
|
|
|
@ -0,0 +1 @@
|
||||||
|
71590ad45cee21249774e2f93e5eca66e446cef3
|
|
@ -1 +0,0 @@
|
||||||
a7cf50aff5bd96e3a0ba551a688bf402e2a594c3
|
|
|
@ -0,0 +1 @@
|
||||||
|
8bd44d50f9a6cdff9c7578ea39d524eb519e35ab
|
|
@ -1 +0,0 @@
|
||||||
cafb9bafb3fc94ac18ed53043396f2c7bccd6c4f
|
|
|
@ -0,0 +1 @@
|
||||||
|
3b132bea69e8ee099f416044970997bde80f4ea6
|
|
@ -1 +0,0 @@
|
||||||
e4a441249ade301985cb8d009d4e4a72b85bf68e
|
|
|
@ -24,6 +24,9 @@ import java.io.Reader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A character stream whose source is a string that is <b>not thread safe</b>
|
* A character stream whose source is a string that is <b>not thread safe</b>
|
||||||
|
* <p>
|
||||||
|
* (shay.banon
|
||||||
|
* )
|
||||||
*/
|
*/
|
||||||
public class FastStringReader extends Reader implements CharSequence {
|
public class FastStringReader extends Reader implements CharSequence {
|
||||||
|
|
||||||
|
@ -31,7 +34,6 @@ public class FastStringReader extends Reader implements CharSequence {
|
||||||
private int length;
|
private int length;
|
||||||
private int next = 0;
|
private int next = 0;
|
||||||
private int mark = 0;
|
private int mark = 0;
|
||||||
private boolean closed = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new string reader.
|
* Creates a new string reader.
|
||||||
|
@ -47,9 +49,8 @@ public class FastStringReader extends Reader implements CharSequence {
|
||||||
* Check to make sure that the stream has not been closed
|
* Check to make sure that the stream has not been closed
|
||||||
*/
|
*/
|
||||||
private void ensureOpen() throws IOException {
|
private void ensureOpen() throws IOException {
|
||||||
if (closed) {
|
if (length == -1)
|
||||||
throw new IOException("Stream closed");
|
throw new IOException("Stream closed");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -195,7 +196,7 @@ public class FastStringReader extends Reader implements CharSequence {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
closed = true;
|
length = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -72,18 +72,18 @@ public class RestActionsTests extends ESTestCase {
|
||||||
public void testParseTopLevelBuilderMalformedJson() throws IOException {
|
public void testParseTopLevelBuilderMalformedJson() throws IOException {
|
||||||
for (String requestBody : Arrays.asList("\"\"", "\"someString\"", "\"{\"")) {
|
for (String requestBody : Arrays.asList("\"\"", "\"someString\"", "\"{\"")) {
|
||||||
try (XContentParser parser = createParser(JsonXContent.jsonXContent, requestBody)) {
|
try (XContentParser parser = createParser(JsonXContent.jsonXContent, requestBody)) {
|
||||||
ParsingException exception = expectThrows(ParsingException.class, () -> RestActions.getQueryContent(parser));
|
ParsingException exception =
|
||||||
|
expectThrows(ParsingException.class, () -> RestActions.getQueryContent(parser));
|
||||||
assertEquals("Expected [START_OBJECT] but found [VALUE_STRING]", exception.getMessage());
|
assertEquals("Expected [START_OBJECT] but found [VALUE_STRING]", exception.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testParseTopLevelBuilderIncompleteJson() throws IOException {
|
public void testParseTopLevelBuilderIncompleteJson() throws IOException {
|
||||||
final String incomplete = "{\"query\":";
|
for (String requestBody : Arrays.asList("{", "{ \"query\" :")) {
|
||||||
for (int i = 1; i <= incomplete.length(); i++) {
|
|
||||||
String requestBody = incomplete.substring(0, i);
|
|
||||||
try (XContentParser parser = createParser(JsonXContent.jsonXContent, requestBody)) {
|
try (XContentParser parser = createParser(JsonXContent.jsonXContent, requestBody)) {
|
||||||
ParsingException exception = expectThrows(ParsingException.class, () -> RestActions.getQueryContent(parser));
|
ParsingException exception =
|
||||||
|
expectThrows(ParsingException.class, () -> RestActions.getQueryContent(parser));
|
||||||
assertEquals("Failed to parse", exception.getMessage());
|
assertEquals("Failed to parse", exception.getMessage());
|
||||||
assertEquals(JsonEOFException.class, exception.getRootCause().getClass());
|
assertEquals(JsonEOFException.class, exception.getRootCause().getClass());
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class JsonProcessorTests extends ESTestCase {
|
||||||
Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
|
Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
|
||||||
assertThat(exception.getCause().getCause().getMessage(), equalTo("Unrecognized token"
|
assertThat(exception.getCause().getCause().getMessage(), equalTo("Unrecognized token"
|
||||||
+ " 'invalid': was expecting ('true', 'false' or 'null')\n"
|
+ " 'invalid': was expecting ('true', 'false' or 'null')\n"
|
||||||
+ " at [Source: (org.elasticsearch.common.io.FastStringReader)\"invalid json\"; line: 1, column: 8]"));
|
+ " at [Source: invalid json; line: 1, column: 8]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testFieldMissing() {
|
public void testFieldMissing() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue