public class ErrorReportConfiguration extends Object implements Serializable
Currently default settings are
_maxErrorTokenLength
)
_maxRawContentLength
)
Modifier and Type | Class and Description |
---|---|
static class |
ErrorReportConfiguration.Builder |
Modifier and Type | Field and Description |
---|---|
protected int |
_maxErrorTokenLength
Maximum length of token to include in error messages
|
protected int |
_maxRawContentLength
Maximum length of raw content to include in error messages
|
static int |
DEFAULT_MAX_ERROR_TOKEN_LENGTH
Default value for
_maxErrorTokenLength . |
static int |
DEFAULT_MAX_RAW_CONTENT_LENGTH
Previously was
com.fasterxml.jackson.core.io.ContentReference#DEFAULT_MAX_CONTENT_SNIPPET . |
Modifier | Constructor and Description |
---|---|
protected |
ErrorReportConfiguration(int maxErrorTokenLength,
int maxRawContentLength) |
Modifier and Type | Method and Description |
---|---|
static ErrorReportConfiguration.Builder |
builder() |
static ErrorReportConfiguration |
defaults() |
int |
getMaxErrorTokenLength()
Accessor for
_maxErrorTokenLength |
int |
getMaxRawContentLength()
Accessor for
_maxRawContentLength |
static void |
overrideDefaultErrorReportConfiguration(ErrorReportConfiguration errorReportConfiguration)
Override the default ErrorReportConfiguration.
|
ErrorReportConfiguration.Builder |
rebuild() |
public static final int DEFAULT_MAX_ERROR_TOKEN_LENGTH
_maxErrorTokenLength
.public static final int DEFAULT_MAX_RAW_CONTENT_LENGTH
com.fasterxml.jackson.core.io.ContentReference#DEFAULT_MAX_CONTENT_SNIPPET
.
Default value for _maxRawContentLength
.protected final int _maxErrorTokenLength
protected final int _maxRawContentLength
protected ErrorReportConfiguration(int maxErrorTokenLength, int maxRawContentLength)
public static void overrideDefaultErrorReportConfiguration(ErrorReportConfiguration errorReportConfiguration)
JsonFactory
instances are not configured with their own ErrorReportConfiguration.
Library maintainers should not set this as it will affect other code that uses Jackson.
Library maintainers who want to configure ErrorReportConfiguration for the Jackson usage within their
lib should create ObjectMapper
instances that have a JsonFactory
instance with
the required ErrorReportConfiguration.
This method is meant for users delivering applications. If they use this, they set it when they start their application to avoid having other code initialize their mappers before the defaults are overridden.
errorReportConfiguration
- new default for ErrorReportConfiguration (a null value will reset to built-in default)defaults()
,
builder()
public static ErrorReportConfiguration.Builder builder()
public static ErrorReportConfiguration defaults()
ErrorReportConfiguration
(when none is set on the JsonFactory
explicitly)overrideDefaultErrorReportConfiguration(ErrorReportConfiguration)
public ErrorReportConfiguration.Builder rebuild()
ErrorReportConfiguration.Builder
initialized with settings of configuration instancepublic int getMaxErrorTokenLength()
_maxErrorTokenLength
ErrorReportConfiguration.Builder.maxErrorTokenLength(int)
public int getMaxRawContentLength()
_maxRawContentLength
ErrorReportConfiguration.Builder.maxRawContentLength(int)
Copyright © 2008–2023 FasterXML. All rights reserved.