Browse Source

Add Javadoc since for gh-34745

Closes gh-34940

Signed-off-by: Johnny Lim <izeye@naver.com>
pull/35405/head
Johnny Lim 7 months ago committed by Brian Clozel
parent
commit
bbae625850
  1. 1
      spring-web/src/main/java/org/springframework/http/converter/xml/AbstractJaxb2HttpMessageConverter.java
  2. 7
      spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverter.java

1
spring-web/src/main/java/org/springframework/http/converter/xml/AbstractJaxb2HttpMessageConverter.java

@ -124,6 +124,7 @@ public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHt @@ -124,6 +124,7 @@ public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHt
* Detect the charset from the given {@link HttpHeaders#getContentType()}.
* @param httpHeaders the current HTTP headers
* @return the charset defined in the content type header, or {@code null} if not found
* @since 6.2.8
*/
@Nullable
protected Charset detectCharset(HttpHeaders httpHeaders) {

7
spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverter.java

@ -161,6 +161,13 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa @@ -161,6 +161,13 @@ public class Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessa
}
}
/**
* Process {@code source} with {@code charset}.
* @param source source to process
* @param charset charset to use
* @return source
* @since 6.2.8
*/
protected Source processSource(Source source, @Nullable Charset charset) {
if (source instanceof StreamSource streamSource) {
InputSource inputSource = new InputSource(streamSource.getInputStream());

Loading…
Cancel
Save