elharo commented on code in PR #77: URL: https://github.com/apache/maven-archiver/pull/77#discussion_r1859014322
########## src/main/java/org/apache/maven/archiver/PomPropertiesUtil.java: ########## @@ -71,8 +71,8 @@ private void createPropertiesFile(Properties properties, Path outputFile, boolea return; } - try (PrintWriter pw = new PrintWriter(outputFile.toFile(), StandardCharsets.ISO_8859_1.name()); - StringWriter sw = new StringWriter()) { + try ( Writer writer = Files.newBufferedWriter(outputFile, StandardCharsets.ISO_8859_1); Review Comment: good idea. That makes this much simpler. ########## src/main/java/org/apache/maven/archiver/PomPropertiesUtil.java: ########## @@ -87,8 +87,9 @@ private void createPropertiesFile(Properties properties, Path outputFile, boolea } Collections.sort(lines); - for (String l : lines) { - pw.println(l); + for (String line : lines) { + writer.write(line); + writer.write( '\n' ); Review Comment: Moot. This code can be deleted now that we're using properties.store -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org