summaryrefslogtreecommitdiffstats
path: root/certServiceClient/src/main
diff options
context:
space:
mode:
authorBogumil Zebek <bogumil.zebek@nokia.com>2020-03-10 12:28:39 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-10 12:28:39 +0000
commita7195b91800a49f749c806d060fadb167d3f1795 (patch)
treecbd6557aab36793828e17347a7ef7ed72c49d4b5 /certServiceClient/src/main
parent776b69d627923138d41b1d893b91495bb71c2c16 (diff)
parent2ceb5596c6491a1a6f3a2c187afeb89329abb078 (diff)
Merge "Fix sonar issue."
Diffstat (limited to 'certServiceClient/src/main')
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/AppExitHandler.java2
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForClient.java3
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java2
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java4
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java2
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/HttpClientException.java2
6 files changed, 5 insertions, 10 deletions
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/AppExitHandler.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/AppExitHandler.java
index 3e33a48b..e29142e8 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/AppExitHandler.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/AppExitHandler.java
@@ -25,7 +25,7 @@ public class AppExitHandler {
public static final Logger LOGGER = LoggerFactory.getLogger(AppExitHandler.class);
public void exit(int exitCode) {
- LOGGER.debug("Application exits with following exit code: " + exitCode);
+ LOGGER.debug("Application exits with following exit code: {}", exitCode);
System.exit(exitCode);
}
} \ No newline at end of file
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForClient.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForClient.java
index 1ce76370..59fd5efc 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForClient.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForClient.java
@@ -24,9 +24,6 @@ import java.util.Optional;
public class EnvsForClient {
private final EnvProvider envProvider = new EnvProvider();
- public EnvsForClient() {
- }
-
public Optional<String> getUrlToCertService() {
return readEnv(ClientConfigurationEnvs.REQUEST_URL);
}
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java
index 77efc198..5a1d33bd 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java
@@ -24,8 +24,6 @@ import java.util.Optional;
public class EnvsForCsr {
private final EnvProvider envProvider = new EnvProvider();
- public EnvsForCsr() {}
-
public Optional<String> getCommonName() {
return readEnv(CsrConfigurationEnvs.COMMON_NAME);
}
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java
index d6496b7a..58d3f6b1 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java
@@ -22,8 +22,8 @@ package org.onap.aaf.certservice.client.configuration.model;
public class ClientConfiguration implements ConfigurationModel {
- Integer DEFAULT_TIMEOUT_MS = 30000;
- String DEFAULT_REQUEST_URL = "http://cert-service:8080/v1/certificate/";
+ private static final Integer DEFAULT_TIMEOUT_MS = 30000;
+ private static final String DEFAULT_REQUEST_URL = "http://cert-service:8080/v1/certificate/";
private String urlToCertService;
private Integer requestTimeout;
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java
index 40470af3..7286318f 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java
@@ -24,7 +24,7 @@ import org.onap.aaf.certservice.client.api.ExitCode;
import org.onap.aaf.certservice.client.api.ExitableException;
public class CertServiceApiResponseException extends ExitableException {
- private final ExitCode EXIT_CODE = ExitCode.CERT_SERVICE_API_CONNECTION_EXCEPTION;
+ private static final ExitCode EXIT_CODE = ExitCode.CERT_SERVICE_API_CONNECTION_EXCEPTION;
public CertServiceApiResponseException(String url, int responseCode, String messageFromAPI) {
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/HttpClientException.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/HttpClientException.java
index d6fb1461..28f83073 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/HttpClientException.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/HttpClientException.java
@@ -24,7 +24,7 @@ import org.onap.aaf.certservice.client.api.ExitCode;
import org.onap.aaf.certservice.client.api.ExitableException;
public class HttpClientException extends ExitableException {
- private final ExitCode EXIT_CODE = ExitCode.HTTP_CLIENT_EXCEPTION;
+ private static final ExitCode EXIT_CODE = ExitCode.HTTP_CLIENT_EXCEPTION;
public HttpClientException(Throwable e) {
super(e);