Browse Source

Use Constants.CHARACTER_ENCODING in tests

Change-Id: Iba9fc991aee54fcb8b0dc5e5841da24c2d54dfc2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.0
David Pursehouse 7 years ago committed by Matthias Sohn
parent
commit
ec84767c33
  1. 2
      org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
  2. 3
      org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ProxyConfigTest.java

2
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");
}

3
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);
}
}
}

Loading…
Cancel
Save