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 0baebc5 commit 055a134
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import org.opensearch.common.inject.Inject
import org.opensearch.common.settings.Settings
import org.opensearch.common.xcontent.LoggingDeprecationHandler
import org.opensearch.common.xcontent.NamedXContentRegistry
import org.opensearch.common.xcontent.ToXContent
import org.opensearch.common.xcontent.XContentBuilder
import org.opensearch.common.xcontent.XContentFactory
import org.opensearch.common.xcontent.XContentParser
Expand Down Expand Up @@ -160,7 +161,6 @@ class TransportGetFindingsSearchAction @Inject constructor(
fun searchDocument(
documentId: String,
sourceIndex: String,
docs: List<FindingDocument>,
actionListener: ActionListener<GetFindingsSearchResponse>
): FindingDocument? {
val getRequest = GetRequest(sourceIndex, documentId)
Expand All @@ -187,7 +187,6 @@ 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)
// TODO: remove debug log
log.info("Response not empty")
val docStr = findingDocument?.toXContent(
Expand Down

0 comments on commit 055a134

Please sign in to comment.