summaryrefslogtreecommitdiffstats
path: root/aai-traversal
diff options
context:
space:
mode:
Diffstat (limited to 'aai-traversal')
-rw-r--r--aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java6
-rw-r--r--aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java4
-rw-r--r--aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java4
3 files changed, 6 insertions, 8 deletions
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java b/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java
index 32e8cbe..4b0f24d 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java
+++ b/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java
@@ -942,10 +942,8 @@ public class SearchGraph {
invItemList.add(invItem);
}
}
- if (invItemList != null) {
- inventoryItems.set("inventoryResponseItem", invItemList);
- inventoryItem.set("inventoryResponseItems", inventoryItems);
- }
+ inventoryItems.set("inventoryResponseItem", invItemList);
+ inventoryItem.set("inventoryResponseItems", inventoryItems);
}
}
return inventoryItem;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java b/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
index a0ddeff..dd718de 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
+++ b/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
@@ -94,7 +94,7 @@ public class AAILogJAXRSInInterceptor extends JAXRSInInterceptor {
ErrorLogHelper.logException(e1);
}
- if (uri.contains(EchoResponse.echoPath)) {
+ if ((uri != null) && (uri.contains(EchoResponse.echoPath))) {
// if it's a health check, we don't want to log ANYTHING if it's a lightweight one
if (query == null) {
if (message.getExchange().containsKey("AAI_LOGGING_HBASE_ENABLED")) {
@@ -106,7 +106,7 @@ public class AAILogJAXRSInInterceptor extends JAXRSInInterceptor {
go = false;
}
}
- else if (uri.contains("/translog/")) {
+ else if ((uri != null) && (uri.contains("/translog/"))) {
// if it's a translog query, we don't want to log the responses
if (message.getExchange().containsKey("AAI_LOGGING_HBASE_LOGRESPONSE")) {
message.getExchange().remove("AAI_LOGGING_HBASE_LOGRESPONSE");
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java b/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java
index ee6b1ab..4330db1 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java
+++ b/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java
@@ -105,7 +105,7 @@ public class SearchProvider extends RESTAPI {
//only consider header value for search
DBConnectionType type = this.determineConnectionType("force-cache", realTime);
final Version version;
- if (versionParam.equals("latest")) {
+ if ("latest".equals(versionParam)) {
version = AAIProperties.LATEST;
} else {
version = Version.valueOf(versionParam);
@@ -197,7 +197,7 @@ public class SearchProvider extends RESTAPI {
DBConnectionType type = this.determineConnectionType("force-cache", realTime);
final Version version;
- if (versionParam.equals("latest")) {
+ if ("latest".equals(versionParam)) {
version = AAIProperties.LATEST;
} else {
version = Version.valueOf(versionParam);