summaryrefslogtreecommitdiffstats
path: root/aai-service/provider
diff options
context:
space:
mode:
Diffstat (limited to 'aai-service/provider')
-rw-r--r--aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java7
-rw-r--r--aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java16
-rw-r--r--aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java12
3 files changed, 16 insertions, 19 deletions
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 f8bfe78f3..1d7fbd167 100644
--- 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
@@ -8,9 +8,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -700,9 +700,6 @@ public abstract class AAIDeclarations implements AAIClient {
String resoourceName = resource;
String identifier = null;
- if(resoourceName == null)
- return QueryStatus.FAILURE;
-
if(resoourceName.contains(":")) {
String[] tokens = resoourceName.split(":");
if(tokens != null && tokens.length > 0) {
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java
index 3090e4981..1c63d2f6c 100644
--- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java
+++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java
@@ -8,9 +8,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -1261,7 +1261,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe
while( ( line = reader.readLine() ) != null ) {
stringBuilder.append( line );
}
- LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder.length() > 0) ? stringBuilder.toString() : "{no-data}");
return true;
} else {
ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
@@ -1371,7 +1371,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe
while( ( line = reader.readLine() ) != null ) {
stringBuilder.append( line );
}
- LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder.length() > 0) ? stringBuilder.toString() : "{no-data}");
return true;
} else {
ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
@@ -1484,7 +1484,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe
while( ( line = reader.readLine() ) != null ) {
stringBuilder.append( line );
}
- LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder.length() > 0) ? stringBuilder.toString() : "{no-data}");
return true;
} else {
ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
@@ -3043,7 +3043,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe
return true;
}
-
+
public boolean isValidURI(String url) {
URI u = null;
@@ -3057,7 +3057,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe
return true;
}
-
+
@Override
protected boolean deleteRelationshipList(URL httpReqUrl, String json_text) throws AAIServiceException {
if(httpReqUrl == null) {
@@ -3329,7 +3329,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe
public String getPathTemplateForResource(String resoourceName, String keys, SvcLogicContext ctx) throws MalformedURLException {
return AAIServiceUtils.getPathForResource(resoourceName, StringUtils.join(keys, " AND "), ctx);
}
-
+
@Override
public boolean isDeprecatedFormat(String resource, HashMap<String, String> nameValues) {
return !AAIServiceUtils.isValidFormat(resource, nameValues);
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java
index 6ce685db0..ef1bc02d9 100644
--- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java
+++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIServiceActivator.java
@@ -8,9 +8,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -157,13 +157,13 @@ public class AAIServiceActivator implements BundleActivator {
if (sdnConfigDirectory == null || sdnConfigDirectory.isEmpty()) {
String filename = DEFAULT_SDNC_PROPERTY_FILE;
File file = new File(filename);
- if(file != null && file.exists()) {
+ if(file.exists()) {
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {
filename = BVC_PROPERTY_FILE;
file = new File(filename);
- if(file != null && file.exists()) {
+ if(file.exists()) {
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {
@@ -179,13 +179,13 @@ public class AAIServiceActivator implements BundleActivator {
if(!propFile.exists()) {
String filename = DEFAULT_SDNC_PROPERTY_FILE;
File file = new File(filename);
- if(file != null && file.exists()) {
+ if(file.exists()) {
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {
filename = BVC_PROPERTY_FILE;
file = new File(filename);
- if(file != null && file.exists()) {
+ if(file.exists()) {
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {