elharo commented on code in PR #331: URL: https://github.com/apache/maven-dependency-plugin/pull/331#discussion_r1294897466
########## src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java: ########## @@ -307,9 +306,8 @@ private void storeClasspathFile(String cpString, File out) throws MojoExecutionE // make sure the parent path exists. out.getParentFile().mkdirs(); - String encoding = Objects.toString(outputEncoding, "UTF-8"); - - try (Writer w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(out), encoding))) { + String encoding = Objects.toString(outputEncoding, StandardCharsets.UTF_8.name()); Review Comment: no need for this, you can use the charset object StandardCharsets.UTF_8 instead without converting to a string -- 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