Skip to content

Commit 59936f0

Browse files
committed
1 parent f8288f8 commit 59936f0

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
<targetJdk>17</targetJdk>
3636
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3737
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
38-
<spring.version>6.2.1</spring.version>
39-
<spring-boot.version>3.4.4</spring-boot.version>
38+
<spring.version>6.2.12</spring.version>
39+
<spring-boot.version>3.5.7</spring-boot.version>
4040
<jadler.version>1.3.1</jadler.version>
4141
<json-unit.version>1.5.3</json-unit.version>
4242
<cxf.version>4.1.0</cxf.version>

src/main/java/cz/geek/fio/NamespaceIgnoringJaxb2HttpMessageConverter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@
1212
import javax.xml.transform.sax.SAXSource;
1313
import javax.xml.transform.stream.StreamSource;
1414
import java.io.StringReader;
15+
import java.nio.charset.Charset;
1516

1617
/**
1718
* Players in FIO publish schema with namespace, but XML from API doesn't contain them :(
1819
*/
1920
class NamespaceIgnoringJaxb2HttpMessageConverter extends Jaxb2RootElementHttpMessageConverter {
2021

2122
@Override
22-
protected Source processSource(Source source) {
23+
protected Source processSource(Source source, Charset charset) {
2324
if (source instanceof StreamSource streamSource) {
2425
InputSource inputSource = new InputSource(streamSource.getInputStream());
26+
if (charset != null) {
27+
inputSource.setEncoding(charset.name());
28+
}
2529
try {
2630
XMLReader xmlReader = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
2731
String featureName = "http://xml.org/sax/features/external-general-entities";

0 commit comments

Comments
 (0)