java.lang.Object
tools.jackson.core.ErrorReportConfiguration
- All Implemented Interfaces:
Serializable
Container for configuration values used when handling errorneous token inputs.
For example, unquoted text segments.
Currently default settings are
- Maximum length of token to include in error messages (see
_maxErrorTokenLength) - Maximum length of raw content to include in error messages (see
_maxRawContentLength)
- Since:
- 2.16
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intMaximum length of token to include in error messagesprotected final intMaximum length of raw content to include in error messagesstatic final intDefault value for_maxErrorTokenLength.static final intDefault value for_maxRawContentLength. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedErrorReportConfiguration(int maxErrorTokenLength, int maxRawContentLength) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ErrorReportConfigurationdefaults()intAccessor for_maxErrorTokenLengthintAccessor for_maxRawContentLengthstatic voidoverrideDefaultErrorReportConfiguration(ErrorReportConfiguration errorReportConfiguration) Override the default ErrorReportConfiguration.rebuild()
-
Field Details
-
DEFAULT_MAX_ERROR_TOKEN_LENGTH
public static final int DEFAULT_MAX_ERROR_TOKEN_LENGTHDefault value for_maxErrorTokenLength.- See Also:
-
DEFAULT_MAX_RAW_CONTENT_LENGTH
public static final int DEFAULT_MAX_RAW_CONTENT_LENGTHDefault value for_maxRawContentLength.- See Also:
-
_maxErrorTokenLength
protected final int _maxErrorTokenLengthMaximum length of token to include in error messages -
_maxRawContentLength
protected final int _maxRawContentLengthMaximum length of raw content to include in error messages
-
-
Constructor Details
-
ErrorReportConfiguration
protected ErrorReportConfiguration(int maxErrorTokenLength, int maxRawContentLength)
-
-
Method Details
-
overrideDefaultErrorReportConfiguration
public static void overrideDefaultErrorReportConfiguration(ErrorReportConfiguration errorReportConfiguration) Override the default ErrorReportConfiguration. These defaults are only used whenJsonFactoryinstances 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
ObjectMapperinstances that have aJsonFactoryinstance 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.
- Parameters:
errorReportConfiguration- new default for ErrorReportConfiguration (a null value will reset to built-in default)- See Also:
-
builder
-
defaults
- Returns:
- the default
ErrorReportConfiguration(when none is set on theJsonFactoryexplicitly) - See Also:
-
rebuild
- Returns:
- New
ErrorReportConfiguration.Builderinitialized with settings of configuration instance
-
getMaxErrorTokenLength
public int getMaxErrorTokenLength()Accessor for_maxErrorTokenLength- Returns:
- Maximum length of token to include in error messages
- See Also:
-
getMaxRawContentLength
public int getMaxRawContentLength()Accessor for_maxRawContentLength- Returns:
- Maximum length of token to include in error messages
- See Also:
-