summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSindhuri.A <arcot.sindhuri@huawei.com>2019-04-19 11:34:35 +0530
committerSindhuri.A <arcot.sindhuri@huawei.com>2019-04-19 12:22:54 +0530
commitc6fe0e0870271f83ef8aeb51d20650a31be76db4 (patch)
tree06990831c5118a642b46215695503ef351b5a2c6 /adapters
parent074c0ebe9c1a0db0a5e0cc936898c35569ff4029 (diff)
Replace type spec, define constant for literal
Replace type specification, define constant for String literal MsoNetworkAdapterAsyncImpl class Issue-ID: SO-1490 Change-Id: Id4b7b8b3dc6d1aca1b76272f85beda9a6df7dfbb Signed-off-by: Sindhuri.A <arcot.sindhuri@huawei.com>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
index 4753b1c18d..d042c9eb19 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
@@ -71,6 +71,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
private static final String NETWORK_EXCEPTION_MSG = "Got a NetworkException on createNetwork: ";
private static final String CREATE_NETWORK_ERROR_LOGMSG = "{} {} Error sending createNetwork notification {} ";
private static final String FAULT_INFO_ERROR_LOGMSG = "{} {} Exception - fault info ";
+ private static final String SHARED = "shared";
@Autowired
private Environment environment;
@@ -127,11 +128,11 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
HashMap<String, String> params = (HashMap<String, String>) networkParams;
if (params == null)
- params = new HashMap<String, String>();
+ params = new HashMap<>();
String shared = null;
String external = null;
- if (params.containsKey("shared"))
- shared = params.get("shared");
+ if (params.containsKey(SHARED))
+ shared = params.get(SHARED);
if (params.containsKey("external"))
external = params.get("external");
@@ -211,11 +212,11 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
HashMap<String, String> params = (HashMap<String, String>) networkParams;
if (params == null)
- params = new HashMap<String, String>();
+ params = new HashMap<>();
String shared = null;
String external = null;
- if (params.containsKey("shared"))
- shared = params.get("shared");
+ if (params.containsKey(SHARED))
+ shared = params.get(SHARED);
if (params.containsKey("external"))
external = params.get("external");