aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java')
-rw-r--r--src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java b/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java
index 42861b4..bbdb4c8 100644
--- a/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java
+++ b/src/main/java/org/onap/aai/datarouter/util/SearchServiceAgent.java
@@ -320,8 +320,7 @@ public class SearchServiceAgent {
* Removes a document from the Search Service.
*
* @param index - The index to create the document in.
- * @param id - The identifier for the document.
- * @param payload - The document contents.
+ * @param documentId - The identifier for the document.
* @param headers - HTTP headers.
*/
public void deleteDocument(String index, String documentId, Map<String, List<String>> headers) {
@@ -340,12 +339,13 @@ public class SearchServiceAgent {
*/
protected String loadFileData(String filename) throws Exception {
StringBuilder data = new StringBuilder();
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(
- EntityEventPolicy.class.getClassLoader().getResourceAsStream("/" + filename),
- StandardCharsets.UTF_8));
- String line;
+ try (InputStreamReader inputStreamReader = new InputStreamReader(EntityEventPolicy.class.getClassLoader()
+ .getResourceAsStream("/" + filename), StandardCharsets.UTF_8); BufferedReader in = new BufferedReader(
+ inputStreamReader)
+ ) {
+
+ String line;
while ((line = in.readLine()) != null) {
data.append(line);
}