private Charset getContentTypeCharset(@Nullable MediaType contentType) { if (contentType != null && contentType.getCharset() != null) { return contentType.getCharset(); } else if (contentType != null && contentType.isCompatibleWith(MediaType.APPLICATION_JSON)) { // Matching to AbstractJackson2HttpMessageConverter#DEFAULT_CHARSET return StandardCharsets.UTF_8; } else { Charset charset = getDefaultCharset(); Assert.state(charset != null, "No default charset"); return charset; } }
private Charset getContentTypeCharset(@Nullable MediaType contentType) { if (contentType != null && contentType.getCharset() != null) { return contentType.getCharset(); } else if (contentType != null && contentType.isCompatibleWith(MediaType.APPLICATION_JSON)) { // Matching to AbstractJackson2HttpMessageConverter#DEFAULT_CHARSET return StandardCharsets.UTF_8; } else { Charset charset = getDefaultCharset(); Assert.state(charset != null, "No default charset"); return charset; } }
private Charset getContentTypeCharset(@Nullable MediaType contentType) { if (contentType != null && contentType.getCharset() != null) { return contentType.getCharset(); } else { Charset charset = getDefaultCharset(); Assert.state(charset != null, "No default charset"); return charset; } }
private Charset getContentTypeCharset(@Nullable MediaType contentType) { if (contentType != null && contentType.getCharset() != null) { return contentType.getCharset(); } else { Charset charset = getDefaultCharset(); Assert.state(charset != null, "No default charset"); return charset; } }
private Charset getContentTypeCharset(MediaType contentType) { if (contentType != null && contentType.getCharSet() != null) { return contentType.getCharSet(); } else { return getDefaultCharset(); } }