-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve Blob
type
#934
Comments
DanielKamkha
added a commit
that referenced
this issue
Jun 1, 2021
Updated JNI conversion function for non-nullable Blobs to avoid returning `null` when the C++ function returns a null shared pointer. Having a null shared pointer coming from C++ when the type is specified as non-nullable in the IDL is a violation of contract. The correct fix for this issue would be to change `Blob` representation from `shared_ptr<vector>` to something that cannot be `null`. However, this would be a breaking change, so it has to be done later (#934). For now it's just the small JNI workaround. Resolves: #929 Signed-off-by: Daniel Kamkha <[email protected]>
DanielKamkha
added a commit
that referenced
this issue
Jun 1, 2021
Updated JNI conversion function for non-nullable Blobs to avoid returning `null` when the C++ function returns a null shared pointer. Having a null shared pointer coming from C++ when the type is specified as non-nullable in the IDL is a violation of contract. The correct fix for this issue would be to change `Blob` representation from `shared_ptr<vector>` to something that cannot be `null`. However, this would be a breaking change, so it has to be done later (#934). For now it's just the small JNI workaround. Resolves: #929 Signed-off-by: Daniel Kamkha <[email protected]>
DanielKamkha
added a commit
that referenced
this issue
Jun 1, 2021
Updated JNI conversion function for non-nullable Blobs to avoid returning `null` when the C++ function returns a null shared pointer. Having a null shared pointer coming from C++ when the type is specified as non-nullable in the IDL is a violation of contract. The correct fix for this issue would be to change `Blob` representation from `shared_ptr<vector>` to something that cannot be `null`. However, this would be a breaking change, so it has to be done later (#934). For now it's just the small JNI workaround. Resolves: #929 Signed-off-by: Daniel Kamkha <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently
Blob
IDL type is represented in C++ asstd::shared_ptr<std::vector<uint8_t>>
, making it nullable in C++ even if the IDL declaration is not marked as such.An alternative way to represent
Blob
in C++ needs to be developed.The text was updated successfully, but these errors were encountered: