Skip to content
Permalink
Browse files
(fix) findbugs errors with FileWriter UTF-8 encoding issues
  • Loading branch information
chtompki committed May 29, 2018
1 parent eff5266 commit 4692d2b62a19cd649b93c6f155544f5f5630d842
Showing 1 changed file with 6 additions and 3 deletions.
@@ -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 @@ private List<File> buildReadmeAndHeaderHtmlFiles() throws MojoExecutionException
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();

0 comments on commit 4692d2b

Please sign in to comment.