summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service
diff options
context:
space:
mode:
authorSteven Blimkie <Steven.Blimkie@amdocs.com>2019-01-16 15:19:33 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-16 15:19:33 +0000
commitacfc65b5eca0c6ad28faca4c8aa59d522eeb8de3 (patch)
tree6dc64aa4aaf78bb518c15bf5ffd9fcc548fb4757 /sparkybe-onap-service
parent9b33f2521b15c3d124ac3299fcd6d61081954b5d (diff)
parent8a7dfd2c6eeba570975ea352b7e6487eeda581f6 (diff)
Merge "Sonar fixes - AggregateVnfSearchProvider"
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);