Open
Conversation
pragmatrix
requested changes
Jun 30, 2021
Member
pragmatrix
left a comment
There was a problem hiding this comment.
So far I think the PR is fine, the only thing that bothers me a bit is that BasicMessage now stores the body string and the body byte array.
pragmatrix
reviewed
Jun 30, 2021
…of a UTF-8 string. This byte array is then used for further parsing in the derived EventMessage class to save converting back again to a byte array from a UTF-8 string. Tests have been extended to include a DetectedSpeech event. There are two variants of this event which are used in the tests, one containing a response with English text in the body and another containing German text and umlaut characters. Add Logger initializer to MessageParsingTests class to allow its test cases to be run independently. Add new test case to MessageParsingTests to test for the successful extraction of body payload from the EventMessage.
8420665 to
74cd2ff
Compare
Member
|
@ajgolledge There is one remaining open conversation here. I think this should be resolved before we merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parse responses encoded in multibyte character sets (e.g. UTF-8) correctly by applying the content length given in the response to the length of the raw byte array and not the encoded string. The length of the string and the length of the byte array are not necessarily equivalent.