diff options
-rw-r--r-- | adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java | 13 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/client/RestClient.java | 1 |
2 files changed, 7 insertions, 7 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"); diff --git a/common/src/main/java/org/onap/so/client/RestClient.java b/common/src/main/java/org/onap/so/client/RestClient.java index 0b10d85bbf..0b3aa651a0 100644 --- a/common/src/main/java/org/onap/so/client/RestClient.java +++ b/common/src/main/java/org/onap/so/client/RestClient.java @@ -28,7 +28,6 @@ import java.net.URL; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Base64; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; |