Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix marshaling on JNI from jobject to cpp #59

Merged
merged 1 commit into from
May 25, 2020

Conversation

tmoura10
Copy link
Contributor

In #58 I've fixed a JNI crash but I didn't realize that the marshaling of the objects was incorrect (the cpp_message.ParseFromArray(b, byte_len); was returning false).

To correctly use the ParseFromArray, we should provide a jbyte. So, in this PR I'm converting the jobject to a jbyte* before use the ParseFromArray.

@tmoura10 tmoura10 force-pushed the Fix-JniMarshalingFromJObjectToCpp branch from 83014bb to 5404d7a Compare May 22, 2020 09:01
@tmoura10 tmoura10 merged commit 97f5f22 into master May 25, 2020
@tmoura10 tmoura10 deleted the Fix-JniMarshalingFromJObjectToCpp branch May 25, 2020 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants