diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-05-09 15:46:32 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-05-09 15:59:59 +0200 |
commit | ad7aed9bb7b529cc98acf46763cd869523296fbc (patch) | |
tree | 1025fa907e90eefd7587b81f90ad6fbb575dc8c6 /vespaclient-container-plugin | |
parent | 9904aaf25710c6affca4140c22fa99501eb325fd (diff) |
Disable string length restriction introduced in Jackson 2.15
Disable restriction only for parsers/generators which is likely to handle literals exceeding 5M
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r-- | vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java index 5d8d4576bad..d3babc682a5 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java @@ -2,7 +2,9 @@ package com.yahoo.document.restapi.resource; import com.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.JsonFactoryBuilder; import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.StreamReadConstraints; import com.yahoo.cloud.config.ClusterListConfig; import com.yahoo.component.annotation.Inject; import com.yahoo.concurrent.DaemonThreadFactory; @@ -152,7 +154,9 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler { @Override public void close(CompletionHandler handler) { handler.completed(); } }; - private static final JsonFactory jsonFactory = new JsonFactory(); + private static final JsonFactory jsonFactory = new JsonFactoryBuilder() + .streamReadConstraints(StreamReadConstraints.builder().maxStringLength(Integer.MAX_VALUE).build()) + .build(); private static final String CREATE = "create"; private static final String CONDITION = "condition"; |