Skip to content

Commit 15a7585

Browse files
FinlayRJWFinlay Williamssvc-changelog
authored
Add WstxInputFactory and WstxOutputFactory to XmlMapper (#1245)
* use stax * Add generated changelog entries --------- Co-authored-by: Finlay Williams <[email protected]> Co-authored-by: svc-changelog <[email protected]>
1 parent 4ad6655 commit 15a7585

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

changelog/@unreleased/pr-1245.v2.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: fix
2+
fix:
3+
description: Add WstxInputFactory and WstxOutputFactory to XmlMapper
4+
links:
5+
- https://github.com/palantir/gradle-consistent-versions/pull/1245

src/main/java/com/palantir/gradle/versions/GenerateMavenRepositoriesTask.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package com.palantir.gradle.versions;
1818

19+
import com.ctc.wstx.stax.WstxInputFactory;
20+
import com.ctc.wstx.stax.WstxOutputFactory;
1921
import com.fasterxml.jackson.annotation.JsonRootName;
2022
import com.fasterxml.jackson.databind.ObjectMapper;
2123
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -38,7 +40,8 @@
3840

3941
public abstract class GenerateMavenRepositoriesTask extends DefaultTask {
4042

41-
private static final ObjectMapper XML_MAPPER = new XmlMapper().registerModule(new GuavaModule());
43+
private static final ObjectMapper XML_MAPPER =
44+
new XmlMapper(new WstxInputFactory(), new WstxOutputFactory()).registerModule(new GuavaModule());
4245

4346
private static final String MAVEN_REPOSITORIES_FILE_NAME = ".idea/gcv-maven-repositories.xml";
4447

0 commit comments

Comments
 (0)