From: tkogut Date: Thu, 17 Sep 2020 07:10:23 +0000 (+0200) Subject: [OOM-CPMv2] Fix sonar issue X-Git-Tag: 2.1.0~6^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=9cf59f7e1a3c55ca1232ce65ee2e9d1481472e33;p=oom%2Fplatform%2Fcert-service.git [OOM-CPMv2] Fix sonar issue Remove the declarations of thrown exceptions Issue-ID: OOM-2526 Signed-off-by: tkogut Change-Id: Ic255a31cea9fa21879c234b6f32db8136d26a115 --- diff --git a/trustStoreMerger/src/main/java/org/onap/oom/certservice/postprocessor/configuration/AppConfigurationProvider.java b/trustStoreMerger/src/main/java/org/onap/oom/certservice/postprocessor/configuration/AppConfigurationProvider.java index 79e223c5..1e9ef8a9 100644 --- a/trustStoreMerger/src/main/java/org/onap/oom/certservice/postprocessor/configuration/AppConfigurationProvider.java +++ b/trustStoreMerger/src/main/java/org/onap/oom/certservice/postprocessor/configuration/AppConfigurationProvider.java @@ -29,7 +29,6 @@ import java.util.Collections; import java.util.List; import java.util.Optional; import org.onap.oom.certservice.postprocessor.configuration.path.env.EnvReader; -import org.onap.oom.certservice.postprocessor.configuration.exception.CertificatesPathsValidationException; import org.onap.oom.certservice.postprocessor.configuration.exception.ConfigurationException; import org.onap.oom.certservice.postprocessor.configuration.model.AppConfiguration; import org.onap.oom.certservice.postprocessor.configuration.model.EnvVariable; @@ -45,9 +44,7 @@ public class AppConfigurationProvider { this.pathsSplitter = pathsSplitter; } - public AppConfiguration createConfiguration() - throws ConfigurationException, CertificatesPathsValidationException { - + public AppConfiguration createConfiguration() { List truststoresPaths = getPaths(TRUSTSTORES_PATHS); List truststoresPasswordsPaths = getPaths(TRUSTSTORES_PASSWORDS_PATHS); List sourceKeystorePaths = getPaths(KEYSTORE_SOURCE_PATHS); @@ -62,7 +59,7 @@ public class AppConfigurationProvider { destinationKeystorePaths); } - private List getPaths(EnvVariable envVariable) throws ConfigurationException { + private List getPaths(EnvVariable envVariable) { Optional envValue = envReader.getEnv(envVariable.name()); isMandatoryEnvPresent(envVariable, envValue); return envValue.isPresent() ? pathsSplitter.getValidatedPaths(envVariable, envValue) : Collections.emptyList(); @@ -75,7 +72,7 @@ public class AppConfigurationProvider { } private void ensureSameSize(List firstList, List secondList, String firstListEnvName, - String secondListEnvName) throws ConfigurationException { + String secondListEnvName) { if (firstList.size() != secondList.size()) { throw new ConfigurationException( "Size of " + firstListEnvName