[findBugs] Use UTF-8 when writing to the error stream in jgit pgm

Change-Id: Ic2555ea932dbbd1a3a6868e731f247b9754d7f09
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2017-05-13 18:01:18 +02:00
parent 9f98d3e2e4
commit 475dcc2985
1 changed files with 4 additions and 1 deletions

View File

@ -44,8 +44,11 @@
package org.eclipse.jgit.pgm;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.File;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
@ -192,7 +195,7 @@ protected void run(final String[] argv) throws Exception {
}
PrintWriter createErrorWriter() {
return new PrintWriter(System.err);
return new PrintWriter(new OutputStreamWriter(System.err, UTF_8));
}
private void execute(final String[] argv) throws Exception {