Skip to content

Commit

Permalink
Expose protected method in AbstractJackson2HttpMessageConverter
Browse files Browse the repository at this point in the history
Closes gh-25509
  • Loading branch information
rstoyanchev committed Sep 7, 2020
1 parent b1d8406 commit b6ff12d
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -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.

Copy link
@quaff

quaff Sep 8, 2020

Contributor

static method cannot be overridden.

This comment has been minimized.

Copy link
@rstoyanchev

rstoyanchev Sep 10, 2020

Author Contributor

Indeed and this was already corrected, check the latest.

if (contentType != null && contentType.getCharset() != null) {
return contentType.getCharset();
}
Expand Down

0 comments on commit b6ff12d

Please sign in to comment.