diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2017-05-13 18:01:18 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2017-05-15 10:27:24 +0200 |
commit | 475dcc2985f4792e54c4b39328b2ca442f2cbe7d (patch) | |
tree | 15089ccfb1a92ee208f07959ef4322a8b624ee8a /org.eclipse.jgit.pgm/src/org/eclipse/jgit | |
parent | 9f98d3e2e4af009e1a5bad7e40969b241d45468b (diff) | |
download | jgit-475dcc2985f4792e54c4b39328b2ca442f2cbe7d.tar.gz jgit-475dcc2985f4792e54c4b39328b2ca442f2cbe7d.zip |
[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>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java index 3addecb2f9..a9f428e02d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java @@ -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 { |