Fix Blocker/Critical sonar issues
Fix Blocker/Critical sonar issues in ccsdk/sli/adaptors module
https://sonar.onap.org/component_issues?id=org.onap.ccsdk.sli.adaptors%3Accsdk-sli-adaptors#resolved=false|severities=BLOCKER
Deleted redundant code
Issue-Id: CCSDK-67
Change-Id: I1bbdb60ead844b91dd0e07795f7f929be8cce44c
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
index 04a0c59..d23fcc7 100755
--- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
+++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
@@ -710,22 +710,19 @@
return QueryStatus.FAILURE;
}
} else {
- String resoourceName = resource;
+ String resourceName = resource;
String identifier = null;
- if(resoourceName == null)
- return QueryStatus.FAILURE;
-
- if(resoourceName.contains(":")) {
- String[] tokens = resoourceName.split(":");
+ if(resourceName.contains(":")) {
+ String[] tokens = resourceName.split(":");
if(tokens != null && tokens.length > 0) {
- resoourceName = tokens[0];
+ resourceName = tokens[0];
identifier = tokens[1];
}
}
if("relationship-list".equals(identifier) || "relationshipList".equals(identifier)) {
// RelationshipRequest relationshipRequest = new RelationshipRequest();
- if("generic-vnf".equals(resoourceName)){
+ if("generic-vnf".equals(resourceName)){
String vnfId = nameValues.get("vnf_id");
String relatedTo = nameValues.get("related_to");
vnfId = vnfId.trim().replace("'", "").replace("$", "").replace("'", "");