summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service
diff options
context:
space:
mode:
authorDriptaroop Das <driptaroop.das@in.ibm.com>2019-01-16 16:32:05 +0530
committerDriptaroop Das <driptaroop.das@in.ibm.com>2019-01-16 16:32:14 +0530
commit8a7dfd2c6eeba570975ea352b7e6487eeda581f6 (patch)
tree1af1bc97f80df798efd31a8e3566dd6d466a629c /sparkybe-onap-service
parentb6b7262ae3939a19856843761882bf04fc09bb26 (diff)
Sonar fixes - AggregateVnfSearchProvider
Sonar fixes - AggregateVnfSearchProvider Issue-ID: AAI-2081 Change-Id: Ia96e0d74bb73c8c4ad5c4220a018cef04f6e424b Signed-off-by: Driptaroop Das <driptaroop.das@in.ibm.com>
Diffstat (limited to 'sparkybe-onap-service')
-rw-r--r--sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateVnfSearchProvider.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateVnfSearchProvider.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateVnfSearchProvider.java
index 74cc940..5749830 100644
--- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateVnfSearchProvider.java
+++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateVnfSearchProvider.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* Copyright © 2017-2018 Amdocs
+ * Copyright © 2019 IBM
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +47,6 @@ public class AggregateVnfSearchProvider implements SearchProvider {
private static final Logger LOG =
LoggerFactory.getInstance().getLogger(AggregateVnfSearchProvider.class);
- private ObjectMapper mapper;
private SearchServiceAdapter searchServiceAdapter = null;
private String autoSuggestIndexName;
private String vnfSearchSuggestionRoute;
@@ -63,7 +63,6 @@ public class AggregateVnfSearchProvider implements SearchProvider {
public AggregateVnfSearchProvider(SearchServiceAdapter searchServiceAdapter,
String autoSuggestIndexName, String vnfSearchSuggestionRoute) {
- mapper = new ObjectMapper();
this.searchServiceAdapter = searchServiceAdapter;
this.autoSuggestIndexName = autoSuggestIndexName;
this.vnfSearchSuggestionRoute = vnfSearchSuggestionRoute;
@@ -76,7 +75,7 @@ public class AggregateVnfSearchProvider implements SearchProvider {
@Override
public List<SearchSuggestion> search(QuerySearchEntity queryRequest) {
- List<SearchSuggestion> returnList = new ArrayList<SearchSuggestion>();
+ List<SearchSuggestion> returnList = new ArrayList<>();
try {
final String fullUrlStr =
@@ -106,7 +105,7 @@ public class AggregateVnfSearchProvider implements SearchProvider {
}
ObjectMapper mapper = new ObjectMapper();
- List<SearchSuggestion> suggestionEntityList = new ArrayList<SearchSuggestion>();
+ List<SearchSuggestion> suggestionEntityList = new ArrayList<>();
try {
JsonNode rootNode = mapper.readTree(operationResult);