From ec84767c338d255c149a59c8766c864b42eaa0f3 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 11 Apr 2018 14:10:02 +0900 Subject: [PATCH] Use Constants.CHARACTER_ENCODING in tests Change-Id: Iba9fc991aee54fcb8b0dc5e5841da24c2d54dfc2 Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/http/test/SmartClientSmartServerTest.java | 2 +- .../tst/org/eclipse/jgit/pgm/ProxyConfigTest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 d8541aa13d..42db0fecde 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 class SmartClientSmartServerTest extends HttpTestCase { 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 06e7a1dbe6..40a223d92f 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.net.MalformedURLException; 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 @@ public class ProxyConfigTest { while ((length = inputStream.read(buffer)) != -1) { result.write(buffer, 0, length); } - return result.toString("UTF-8"); + return result.toString(Constants.CHARACTER_ENCODING); } } } -- 2.39.5