diff --git a/gradle.properties b/gradle.properties index c2cb4ad..c774e22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ id = hmci group = biz.nellemann.hmci -version = 1.1.4 +version = 1.1.5 diff --git a/src/main/java/biz/nellemann/hmci/Application.java b/src/main/java/biz/nellemann/hmci/Application.java index d39d2c7..6953eac 100644 --- a/src/main/java/biz/nellemann/hmci/Application.java +++ b/src/main/java/biz/nellemann/hmci/Application.java @@ -28,7 +28,6 @@ import java.util.concurrent.Callable; @Command(name = "hmci", mixinStandardHelpOptions = true, - description = "HMC Insights.", versionProvider = biz.nellemann.hmci.VersionProvider.class) public class Application implements Callable { @@ -59,11 +58,9 @@ public class Application implements Callable { switch (enableDebug.length) { case 1: - System.out.println("DEBUG"); System.setProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "DEBUG"); break; case 2: - System.out.println("TRACE"); System.setProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "TRACE"); break; } diff --git a/src/main/java/biz/nellemann/hmci/HmcRestClient.java b/src/main/java/biz/nellemann/hmci/HmcRestClient.java index 5f0f4e3..f3a8e1b 100644 --- a/src/main/java/biz/nellemann/hmci/HmcRestClient.java +++ b/src/main/java/biz/nellemann/hmci/HmcRestClient.java @@ -50,9 +50,9 @@ public class HmcRestClient { private final OkHttpClient client; // OkHttpClient timeouts - private final static int CONNECT_TIMEOUT = 15; - private final static int WRITE_TIMEOUT = 15; - private final static int READ_TIMEOUT = 15; + private final static int CONNECT_TIMEOUT = 30; + private final static int WRITE_TIMEOUT = 30; + private final static int READ_TIMEOUT = 30; private final String baseUrl; private final String username; @@ -117,7 +117,7 @@ public class HmcRestClient { log.error("login() - URL Error: " + e.getMessage()); throw e; } catch (Exception e) { - log.error("login() - Error", e); + log.error("login() - Error: " + e.getMessage()); throw e; } @@ -409,6 +409,9 @@ public class HmcRestClient { private String sendGetRequest(URL url) throws Exception { log.trace("getResponse() - " + url.toString()); + if(authToken == null) { + return null; + } Request request = new Request.Builder() .url(url) @@ -448,6 +451,9 @@ public class HmcRestClient { public String sendPostRequest(URL url, String payload) throws Exception { log.trace("sendPostRequest() - " + url.toString()); + if(authToken == null) { + return null; + } RequestBody requestBody; if(payload != null) {