elharo commented on code in PR #444:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/444#discussion_r3297443302


##########
src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java:
##########
@@ -341,15 +341,19 @@ private boolean 
checkItemMatchesBaseline(ProjectsInputInfo baselineBuild, Digest
      */
     private String getEffectivePom(Model prototype) throws IOException {
         ByteArrayOutputStream output = new ByteArrayOutputStream();
+        try (Writer writer = new OutputStreamWriter(output, 
StandardCharsets.UTF_8)) {
+            new MavenXpp3Writer().write(output, prototype);
+        }
 
-        try (Writer writer = WriterFactory.newXmlWriter(output)) {
-            new MavenXpp3Writer().write(writer, prototype);
+        // normalize env specifics
+        final String[] searchList = {baseDirPath.toString(), "\\", "windows", 
"linux"};
+        final String[] replacementList = {"", "/", "os.classifier", 
"os.classifier"};
 
-            // normalize env specifics
-            final String[] searchList = {baseDirPath.toString(), "\\", 
"windows", "linux"};
-            final String[] replacementList = {"", "/", "os.classifier", 
"os.classifier"};
-            return replaceEachRepeatedly(output.toString(), searchList, 
replacementList);
-        }
+        String result = 
output.toString(java.nio.charset.StandardCharsets.UTF_8.name());

Review Comment:
   no need to fully qualify the name here. just StandardCharsets.UTF_8



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to