summaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2018-05-22 08:36:40 +0200
committerTal Gitelman <tg851x@intl.att.com>2018-07-24 14:21:26 +0000
commitd0f8678bfa7f06f06c9f1dd3cad862b1b99c3a03 (patch)
tree277b0775e7a520242708e0866eb0f3bf67259661 /common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
parent4c9bc0204405fc840cac190fb9e0de946f3899ff (diff)
Fix sonar violations
Fix major sonar violations in ConfigurationUtils,ConfigurationImpl, PropertyType Issue-ID: SDC-1353 Change-Id: Ic3959ba174f0a9fcd3976c9d12c6425dc4353e72 Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java')
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
index 43b1b96fc5..7faf3ee8cf 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
@@ -206,12 +206,13 @@ public class ConfigurationImpl implements org.onap.config.api.Configuration {
@Override
public <T> T get(String tenant, String namespace, String key, Class<T> clazz, Hint... hints) {
- String[] tenantNamespaceArrayy = null;
- if (tenant == null && namespace != null
- && (tenantNamespaceArrayy = namespace.split(Constants.TENANT_NAMESPACE_SAPERATOR)).length
- > 1) {
- tenant = tenantNamespaceArrayy[0];
- namespace = tenantNamespaceArrayy[1];
+ String[] tenantNamespaceArrayy;
+ if (tenant == null && namespace != null) {
+ tenantNamespaceArrayy = namespace.split(Constants.TENANT_NAMESPACE_SAPERATOR);
+ if (tenantNamespaceArrayy.length > 1) {
+ tenant = tenantNamespaceArrayy[0];
+ namespace = tenantNamespaceArrayy[1];
+ }
}
tenant = ConfigurationRepository.lookup().isValidTenant(tenant) ? tenant.toUpperCase()