Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose protected method in AbstractJackson2HttpMessageConverter
Closes gh-25509
- Loading branch information
1 parent
b1d8406
commit b6ff12d
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -285,7 +285,15 @@ private Object readJavaType(JavaType javaType, HttpInputMessage inputMessage) th | |
} | ||
} | ||
|
||
private static Charset getCharset(@Nullable MediaType contentType) { | ||
/** | ||
* Return the charset to use for JSON input. | ||
* <p>By default this is either the charset from the input {@code MediaType} | ||
* or otherwise falling back on {@code UTF-8}. | ||
* @param contentType the content type of the HTTP input message | ||
* @return the charset to use | ||
* @since 5.1.18 | ||
*/ | ||
protected static Charset getCharset(@Nullable MediaType contentType) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rstoyanchev
Author
Contributor
|
||
if (contentType != null && contentType.getCharset() != null) { | ||
return contentType.getCharset(); | ||
} | ||
|
static method cannot be overridden.