Import StandardCharsets.UTF_8 as static

Change-Id: I066770f2eddfa7e9c1a67e91544006d33062d6d0
This commit is contained in:
David Pursehouse
2015-10-19 14:59:46 +09:00
parent 7f6601429a
commit c5cc9ddd12
8 changed files with 23 additions and 22 deletions

View File

@@ -15,11 +15,11 @@
package com.google.gerrit.acceptance;
import static com.google.gerrit.httpd.restapi.RestApiServlet.JSON_MAGIC;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.StandardCharsets;
public class RestResponse extends HttpResponse {
@@ -30,9 +30,8 @@ public class RestResponse extends HttpResponse {
@Override
public Reader getReader() throws IllegalStateException, IOException {
if (reader == null && response.getEntity() != null) {
reader =
new InputStreamReader(response.getEntity().getContent(),
StandardCharsets.UTF_8);
reader = new InputStreamReader(
response.getEntity().getContent(), UTF_8);
reader.skip(JSON_MAGIC.length);
}
return reader;