add charset arg to InputStreamReader constructor

thanks to findbugs.
This commit is contained in:
Hiroaki KAWAI 2014-01-31 12:57:13 +09:00
parent ed3e1b95b0
commit 836a9caa72

View File

@ -139,7 +139,7 @@ public class SspClient {
return null;
}
try {
return new Gson().fromJson(new InputStreamReader(res.getEntity().getContent()),
return new Gson().fromJson(new InputStreamReader(res.getEntity().getContent(), "UTF-8"),
TenantNetwork.class);
} catch (JsonSyntaxException e) {
s_logger.error("reading response body failed", e);
@ -188,7 +188,7 @@ public class SspClient {
return null;
}
try {
return new Gson().fromJson(new InputStreamReader(res.getEntity().getContent()),
return new Gson().fromJson(new InputStreamReader(res.getEntity().getContent(), "UTF-8"),
TenantPort.class);
} catch (JsonSyntaxException e) {
s_logger.error("reading response body failed", e);
@ -228,7 +228,7 @@ public class SspClient {
return null;
}
try {
return new Gson().fromJson(new InputStreamReader(res.getEntity().getContent()),
return new Gson().fromJson(new InputStreamReader(res.getEntity().getContent(), "UTF-8"),
TenantPort.class);
} catch (JsonSyntaxException e) {
s_logger.error("reading response body failed", e);