Browse Source

[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>
tags/v4.8.0.201705170830-rc1
Matthias Sohn 7 years ago
parent
commit
475dcc2985
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java

+ 4
- 1
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java 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 @@ public class Main {
}

PrintWriter createErrorWriter() {
return new PrintWriter(System.err);
return new PrintWriter(new OutputStreamWriter(System.err, UTF_8));
}

private void execute(final String[] argv) throws Exception {

Loading…
Cancel
Save