From 69d5e89e99707119837eb1f025ee2c8d6d376996 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 13 May 2017 18:58:21 +0200 Subject: [PATCH] [findBugs] Use UTF-8 to write to the error stream in TextProgressMonitor Change-Id: Ic85db2043d6f673f268bf781917daad45d28f8cd Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/lib/TextProgressMonitor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java index 7675fccb6..c31c3c693 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java @@ -44,7 +44,10 @@ package org.eclipse.jgit.lib; +import static java.nio.charset.StandardCharsets.UTF_8; + import java.io.IOException; +import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Writer; @@ -56,7 +59,7 @@ public class TextProgressMonitor extends BatchingProgressMonitor { /** Initialize a new progress monitor. */ public TextProgressMonitor() { - this(new PrintWriter(System.err)); + this(new PrintWriter(new OutputStreamWriter(System.err, UTF_8))); } /**