Skip to content

Commit

Permalink
Update TransportGetFindingsSearchAction.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Annie Lee committed Mar 29, 2022
1 parent e73e4db commit 18d5e1d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ class TransportGetFindingsSearchAction @Inject constructor(
findings.add(finding)
for (doc_id in doc_ids) {
val document = searchDocument(doc_id, sourceIndex, actionListener)
if (document)
if (document != null)
docs.add(document)
}
findingsWithDocs.add(FindingWithDocs(finding, docs))
// TODO: remove debug log
log.info("findingsWithDoc: $findingsWithDoc")
log.info("findingsWithDocs: $findingsWithDocs")
}
actionListener.onResponse(GetFindingsSearchResponse(RestStatus.OK, totalFindingCount, findings))
}
Expand All @@ -183,8 +183,8 @@ class TransportGetFindingsSearchAction @Inject constructor(
fun searchDocument(
documentId: String,
sourceIndex: String,
actionListener: ActionListener<GetFindingsSearchResponse>
): FindingDocument {
actionListener: ActionListener<FindingDocument>
) {
val getRequest = GetRequest(sourceIndex, documentId)
client.threadPool().threadContext.stashContext().use {
client.get(
Expand Down

0 comments on commit 18d5e1d

Please sign in to comment.