Skip to content

chore(ok_http): migrate to jni 1.0.0#1943

Open
EchoEllet wants to merge 6 commits into
dart-lang:masterfrom
EchoEllet:chore/update-jni
Open

chore(ok_http): migrate to jni 1.0.0#1943
EchoEllet wants to merge 6 commits into
dart-lang:masterfrom
EchoEllet:chore/update-jni

Conversation

@EchoEllet

@EchoEllet EchoEllet commented Jun 30, 2026

Copy link
Copy Markdown

Fixes :

All the changes in the commit (f2130a6) were automated by jnigen.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

Comment on lines +156 to 159
} on JThrowable catch (e) {
if (e.message.contains('java.io.IOException')) {
throw _JavaIOException(e);
}

@EchoEllet EchoEllet Jun 30, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The previous workaround can be avoided now with the recent changes.

Source: https://pub.dev/packages/jni/changelog#100

Breaking Change: JniException has been deleted. Java exceptions are now thrown as JThrowable instead. JThrowable holds an actual Java exception, instead of just holding a string message. It's a JObject, so the usual .isA and .as methods work to cast the JThrowable to the underlying Java exception.

Screenshot

I have noticed that cronet_http could also use the same cleanup for consistency.

image

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.

1 participant