aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-09-28 03:51:49 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-28 03:51:49 +0000
commit376e47314c781fce9a2a1f3facccf9dbce80d325 (patch)
treee0d0896b915b2877a4864bac4cb154640423ed58 /controlloop/common
parentc0ff48a4338a8e5adcdc30b4298f90c25341c2a0 (diff)
parent23390e1a8ac5705ccd6853b0bc80d3a04707a3d9 (diff)
Merge "Fix major sonar issues"
Diffstat (limited to 'controlloop/common')
-rw-r--r--controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
index a014c7a80..8c1b23af9 100644
--- a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
+++ b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
@@ -136,10 +136,10 @@ public class SOActorServiceProvider implements Actor {
}
- /**
+ /**
* Constructs and sends an AAI vserver Named Query
*
- * @param eventRequestID
+ * @param onset
* @returns the response to the AAI Named Query
*/
private AAINQResponseWrapper AaiNamedQueryRequest(VirtualControlLoopEvent onset) {
@@ -239,9 +239,9 @@ public class SOActorServiceProvider implements Actor {
int nonBaseIndex = -1;
List<AAINQInventoryResponseItem> inventoryItems = namedQueryResponseWrapper.aainqresponse.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems;
for (AAINQInventoryResponseItem m : inventoryItems) {
- if (m.vfModule != null && m.vfModule.isBaseVfModule == true) {
+ if (m.vfModule != null && m.vfModule.isBaseVfModule) {
baseIndex = inventoryItems.indexOf(m);
- } else if (m.vfModule != null && m.vfModule.isBaseVfModule == false && m.vfModule.orchestrationStatus == null) {
+ } else if (m.vfModule != null && m.vfModule.orchestrationStatus == null) {
nonBaseIndex = inventoryItems.indexOf(m);
}
//
@@ -302,7 +302,7 @@ public class SOActorServiceProvider implements Actor {
}
// Extracted fields should not be null
- if (checkExtractedFields() == false) {
+ if (!checkExtractedFields()) {
System.err.println("some fields are missing from AAI response.");
return;
}
@@ -338,7 +338,7 @@ public class SOActorServiceProvider implements Actor {
*/
public SORequest constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy) {
- if (policy.getActor().equals("SO") && policy.getRecipe().equals("VF Module Create")) {
+ if ("SO".equals(policy.getActor()) && "VF Module Create".equals(policy.getRecipe())) {
// perform named query request and handle response
AaiNamedQueryRequest(onset);
} else {
@@ -348,7 +348,7 @@ public class SOActorServiceProvider implements Actor {
// check if the fields extracted from named query response are
// not null so we can proceed with SO request
- if (checkExtractedFields() == false) {
+ if (!checkExtractedFields()) {
System.err.println("AAI response is missing some required fields. Cannot proceed with SO Request construction.");
return null;
@@ -553,7 +553,7 @@ public class SOActorServiceProvider implements Actor {
}
/**
- * @param serviceItemModeInvariantlId the serviceItemModelInvariantId to set
+ * @param serviceItemModelInvariantId the serviceItemModelInvariantId to set
*/
private void setServiceItemModelInvariantId(String serviceItemModelInvariantId) {
this.serviceItemModelInvariantId = serviceItemModelInvariantId;