Use Constants.CHARACTER_ENCODING in tests

Change-Id: Iba9fc991aee54fcb8b0dc5e5841da24c2d54dfc2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2018-04-11 14:10:02 +09:00 committed by Matthias Sohn
parent b0ac5f9c89
commit ec84767c33
2 changed files with 3 additions and 2 deletions

View File

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

View File

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