aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMamtha <mamtha.sabesan@in.ibm.com>2020-04-28 00:30:59 +0530
committerMamtha Sabesan <mamtha.sabesan@in.ibm.com>2020-04-28 18:47:39 +0000
commit82f1151defb2e3cb19228a4dc7e26f59fe145da9 (patch)
tree7026746f5c99fe5e3cbbe184da782246a1eb68e8
parent9ad0d913dc0e3188d3af153c606d47faf834d11e (diff)
sonarFixes. reduce code smell
Issue-ID: APPC-1858 Change-Id: I5cfdba67456b0fcbd566117584471e6616e888e7 Signed-off-by: Mamtha <mamtha.sabesan@in.ibm.com>
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/DettachVolumeServer.java7
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java2
2 files changed, 4 insertions, 5 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/DettachVolumeServer.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/DettachVolumeServer.java
index 606df1ed3..a7f3c9dc1 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/DettachVolumeServer.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/DettachVolumeServer.java
@@ -177,7 +177,7 @@ public class DettachVolumeServer extends ProviderServerOperation {
if (map != null && !(map.isEmpty())) {
Iterator<Entry<String, String>> it = map.entrySet().iterator();
while (it.hasNext()) {
- Map.Entry volumes = (Map.Entry) it.next();
+ Map.Entry<String, String> volumes = it.next();
logger.info("volumes available in before detach");
logger.info("device" + volumes.getKey() + "volume" + volumes.getValue());
if (volumes.getValue().equals(volumeId)) {
@@ -190,7 +190,7 @@ public class DettachVolumeServer extends ProviderServerOperation {
}
protected boolean validateDetach(RequestContext rc, ComputeService ser, String vm, String volumeId)
- throws RequestFailedException, ZoneException {
+ throws ZoneException {
boolean flag = false;
String msg = null;
config.setProperty(Constants.PROPERTY_RETRY_DELAY, "10");
@@ -201,7 +201,7 @@ public class DettachVolumeServer extends ProviderServerOperation {
Iterator<Entry<String, String>> it = map.entrySet().iterator();
logger.info("volumes available after detach ");
while (it.hasNext()) {
- Map.Entry volumes = (Map.Entry) it.next();
+ Map.Entry<String, String> volumes = it.next();
logger.info(" devices " + volumes.getKey() + " volumes" + volumes.getValue());
if (volumes.getValue().equals(volumeId)) {
logger.info("Device" + volumes.getKey() + "Volume" + volumes.getValue());
@@ -215,7 +215,6 @@ public class DettachVolumeServer extends ProviderServerOperation {
if (flag) {
rc.delay();
} else {
- flag = false;
break;
}
} else {
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java
index daa8b2622..f42028892 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/LookupServer.java
@@ -51,7 +51,7 @@ import static org.onap.appc.adapter.utils.Constants.ADAPTER_NAME;
public class LookupServer extends ProviderServerOperation {
- private static final EELFLogger logger = EELFManager.getInstance().getLogger(EvacuateServer.class);
+ private static final EELFLogger logger = EELFManager.getInstance().getLogger(LookupServer.class);
private static final Configuration configuration = ConfigurationFactory.getConfiguration();
private static final String SERVERFOUND = "serverFound";