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

CBL-1048: char[] encoding in Fleece encoder #207

Merged
merged 2 commits into from
Aug 28, 2023
Merged

CBL-1048: char[] encoding in Fleece encoder #207

merged 2 commits into from
Aug 28, 2023

Conversation

bmeike
Copy link
Contributor

@bmeike bmeike commented Aug 26, 2023

There are some other "in passing" fixes here. Mostly though, I'd appreciate having you look at jstringSlice::jstringSlice(JNIEnv *env, jbyteArray jchars)

That's the heart of the matter. testBasicAuthOptions verifies that the authenticator password option does, in fact, make it to the network code as a string.

@bmeike bmeike requested review from pasin and borrrden August 26, 2023 00:32
@bmeike bmeike self-assigned this Aug 26, 2023
if (length <= 0) {
_slice = kFLSliceNull;
} else {
auto *chars = env->GetByteArrayElements(jchars, nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

char* needs be released after use. jbyteArraySlice does handle that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woo.... Thanks Pasin!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Actually, you fixed it...

@bmeike bmeike requested a review from pasin August 28, 2023 17:32
@bmeike bmeike merged commit 137ae8b into master Aug 28, 2023
@bmeike bmeike deleted the pr/CBL-1048 branch August 28, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants