mirror of https://github.com/shred/acme4j
Code style issues fix
parent
428ca84613
commit
048994de8e
|
@ -178,7 +178,7 @@ public class DefaultConnection implements Connection {
|
||||||
try {
|
try {
|
||||||
InputStream in = (conn.getResponseCode() < 400 ? conn.getInputStream() : conn.getErrorStream());
|
InputStream in = (conn.getResponseCode() < 400 ? conn.getInputStream() : conn.getErrorStream());
|
||||||
if (in != null) {
|
if (in != null) {
|
||||||
final String response = readStream(in);
|
String response = readStream(in);
|
||||||
|
|
||||||
result = JsonUtil.parseJson(response);
|
result = JsonUtil.parseJson(response);
|
||||||
LOG.debug("Result JSON: {}", sb);
|
LOG.debug("Result JSON: {}", sb);
|
||||||
|
@ -191,8 +191,8 @@ public class DefaultConnection implements Connection {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String readStream(final InputStream in) throws IOException {
|
private String readStream(InputStream in) throws IOException {
|
||||||
final StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(in, "utf-8"))) {
|
try (BufferedReader reader = new BufferedReader(new InputStreamReader(in, "utf-8"))) {
|
||||||
String line = reader.readLine();
|
String line = reader.readLine();
|
||||||
|
|
Loading…
Reference in New Issue