Skip to content

Commit

Permalink
fix serde of RemoteDocLevelMonitorInput (opensearch-project#666)
Browse files Browse the repository at this point in the history
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
  • Loading branch information
sbcd90 authored and jowg-amazon committed Jul 2, 2024
1 parent e18d899 commit 211e4b6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ data class RemoteDocLevelMonitorInput(val input: BytesReference, val docLevelMon
when (fieldName) {
RemoteMonitorInput.INPUT_FIELD -> bytes = xcp.binaryValue()
RemoteMonitorInput.INPUT_SIZE -> size = xcp.intValue()
Input.Type.DOCUMENT_LEVEL_INPUT.value -> docLevelMonitorInput = DocLevelMonitorInput.parse(xcp)
Input.Type.DOCUMENT_LEVEL_INPUT.value -> {
docLevelMonitorInput = DocLevelMonitorInput.parse(xcp)
XContentParserUtils.ensureExpectedToken(XContentParser.Token.END_OBJECT, xcp.nextToken(), xcp)
}
}
}
val input = BytesReference.fromByteBuffer(ByteBuffer.wrap(bytes, 0, size))
Expand Down

0 comments on commit 211e4b6

Please sign in to comment.