HttpResponse: Specify charset in constructor of InputStreamReader
When all error prone warnings are enabled the DefaultCharset
bug pattern is reported:
plugins/replication/src/main/java/com/googlesource/gerrit/plugins/replication/HttpResponse.java:37:
error: [DefaultCharset] Implicit use of the platform default charset, which can
result in differing behaviour between JVM executions or incorrect behavior if
the encoding of the data source doesn't match expectations.
reader = new InputStreamReader(response.getEntity().getContent());
^
(see https://errorprone.info/bugpattern/DefaultCharset)
Change-Id: I7a8e0d39fdcd06e7d73d7ed89d0f12f4232b2600
1 file changed