Browse Source

Use Constants.CHARACTER_ENCODING in tests

Change-Id: Iba9fc991aee54fcb8b0dc5e5841da24c2d54dfc2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
tags/v5.0.0.201805151920-m7
David Pursehouse 6 years ago
parent
commit
ec84767c33

+ 1
- 1
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java View File

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

+ 2
- 1
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ProxyConfigTest.java View File

@@ -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