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 30, 2022
1 parent c077f22 commit f57a169
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ class TransportGetFindingsSearchAction @Inject constructor(
.createParser(xContentRegistry, LoggingDeprecationHandler.INSTANCE, response.toString())
XContentParserUtils.ensureExpectedToken(XContentParser.Token.START_OBJECT, xcp.nextToken(), xcp)
findingDocument = FindingDocument.parse(xcp)
docs.add(findingDocument)
addDocument(findingDocument, docs)
// TODO: remove debug log
log.info("Response not empty")
log.info("findingDocument: ${findingDocument.toXContent}")
log.info("findingDocument: ${findingDocument}")
}
}

Expand All @@ -202,4 +202,8 @@ class TransportGetFindingsSearchAction @Inject constructor(
)
}
}

private fun addDocument(findingDocument: FindingDocument, docs: MutableList<FindingDocument>) {
docs.add(findingDocument)
}
}

0 comments on commit f57a169

Please sign in to comment.