diff options
author | Jegadeesh Babu <jegabab1@in.ibm.com> | 2019-03-26 13:49:01 +0530 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2019-03-26 22:46:17 +0000 |
commit | 7f9b935dca58494b68b44a26e4ac3177db179d1a (patch) | |
tree | b20c6705d1800e41f79a2a78e1b5f0e90016bb6b /appc-adapters/appc-iaas-adapter | |
parent | f59155c1c12543e54972298a3020e2372edb79b7 (diff) |
Added constant to replace dup literals
Sonar fix
Issue-ID: APPC-1558
Change-Id: I98e36669f5d247a8fe8a9c38d6e5724e76284487
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter')
-rw-r--r-- | appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/AppcProviderAdapterActivator.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/AppcProviderAdapterActivator.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/AppcProviderAdapterActivator.java index 86c8e89e9..cdde4c3e4 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/AppcProviderAdapterActivator.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/AppcProviderAdapterActivator.java @@ -6,6 +6,8 @@ * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= + * Modifications Copyright (C) 2019 IBM + * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -74,7 +76,8 @@ public class AppcProviderAdapterActivator implements BundleActivator { */ private Configuration configuration; - private static final String IAAS_ADAPTER = "APPC IaaS adapter"; + private static final String APPC_IAAS_ADAPTER = "APPC IaaS adapter"; + private static final String IAAS_ADAPTER = "IAAS adapter"; /** * Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start * this bundle. This method can be used to register services or to allocate any resources that this bundle needs. @@ -94,7 +97,7 @@ public class AppcProviderAdapterActivator implements BundleActivator { configuration = ConfigurationFactory.getConfiguration(); String appName = configuration.getProperty(Constants.PROPERTY_APPLICATION_NAME); - logger.info(Msg.COMPONENT_INITIALIZING, appName, "IAAS adapter"); + logger.info(Msg.COMPONENT_INITIALIZING, appName, IAAS_ADAPTER); try { adapter = new ProviderAdapterImpl(configuration.getProperties()); } catch (Exception e) { @@ -108,7 +111,7 @@ public class AppcProviderAdapterActivator implements BundleActivator { registration = context.registerService(ProviderAdapter.class, adapter, null); } - logger.info(Msg.COMPONENT_INITIALIZED, appName, "IAAS adapter"); + logger.info(Msg.COMPONENT_INITIALIZED, appName, IAAS_ADAPTER); } /** @@ -132,16 +135,16 @@ public class AppcProviderAdapterActivator implements BundleActivator { if (registration != null) { String appName = configuration.getProperty(Constants.PROPERTY_APPLICATION_NAME); - logger.info(Msg.COMPONENT_TERMINATING, appName, "IAAS adapter"); + logger.info(Msg.COMPONENT_TERMINATING, appName, IAAS_ADAPTER); logger.info(Msg.UNREGISTERING_SERVICE, appName, adapter.getAdapterName()); registration.unregister(); registration = null; - logger.info(Msg.COMPONENT_TERMINATED, appName, "IAAS adapter"); + logger.info(Msg.COMPONENT_TERMINATED, appName, IAAS_ADAPTER); } } public String getName() { - return IAAS_ADAPTER; + return APPC_IAAS_ADAPTER; } } |