You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2018/05/29 13:00:05 UTC
commons-release-plugin git commit: (fix) findbugs errors with
FileWriter UTF-8 encoding issues
Repository: commons-release-plugin
Updated Branches:
refs/heads/master eff5266a5 -> 4692d2b62
(fix) findbugs errors with FileWriter UTF-8 encoding issues
Project: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/commit/4692d2b6
Tree: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/tree/4692d2b6
Diff: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/diff/4692d2b6
Branch: refs/heads/master
Commit: 4692d2b62a19cd649b93c6f155544f5f5630d842
Parents: eff5266
Author: Rob Tompkins <ch...@gmail.com>
Authored: Tue May 29 09:00:00 2018 -0400
Committer: Rob Tompkins <ch...@gmail.com>
Committed: Tue May 29 09:00:00 2018 -0400
----------------------------------------------------------------------
.../plugin/mojos/CommonsDistributionStagingMojo.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/4692d2b6/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
index 3409849..dc80ae7 100755
--- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
+++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
@@ -17,8 +17,9 @@
package org.apache.commons.release.plugin.mojos;
import java.io.File;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
@@ -299,8 +300,10 @@ public class CommonsDistributionStagingMojo extends AbstractMojo {
File headerFile = new File(distCheckoutDirectory, "HEADER.html");
File readmeFile = new File(distCheckoutDirectory, "README.html");
try {
- Writer headerWriter = new FileWriter(headerFile);
- Writer readmeWriter = new FileWriter(readmeFile);
+ FileOutputStream headerStream = new FileOutputStream(headerFile);
+ Writer headerWriter = new OutputStreamWriter(headerStream, "UTF-8");
+ FileOutputStream readmeStream = new FileOutputStream(readmeFile);
+ Writer readmeWriter = new OutputStreamWriter(readmeStream, "UTF-8");
HeaderHtmlVelocityDelegate headerHtmlVelocityDelegate = HeaderHtmlVelocityDelegate
.builder()
.build();