diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index d8541aa13..42db0fecd 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@ -266,7 +266,7 @@ public void doFilter(ServletRequest request, throws IOException, ServletException { final HttpServletResponse r = (HttpServletResponse) response; r.setContentType("text/plain"); - r.setCharacterEncoding("UTF-8"); + r.setCharacterEncoding(Constants.CHARACTER_ENCODING); try (PrintWriter w = r.getWriter()) { w.print("OK"); } diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ProxyConfigTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ProxyConfigTest.java index 06e7a1dbe..40a223d92 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ProxyConfigTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ProxyConfigTest.java @@ -47,6 +47,7 @@ import java.util.List; import java.util.Map; +import org.eclipse.jgit.lib.Constants; import org.junit.Before; import org.junit.Test; @@ -203,7 +204,7 @@ private static String getOutput(Process p) while ((length = inputStream.read(buffer)) != -1) { result.write(buffer, 0, length); } - return result.toString("UTF-8"); + return result.toString(Constants.CHARACTER_ENCODING); } } }