Skip to content

check for pending exceptions after each CallObjectMethod + prepare the release - #12

Merged
sylvestre merged 7 commits into
mainfrom
prep
Aug 7, 2026
Merged

check for pending exceptions after each CallObjectMethod + prepare the release#12
sylvestre merged 7 commits into
mainfrom
prep

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

No description provided.

The retrieve helpers of the generated exception class called
GetStringUTFChars/GetArrayLength right after CallObjectMethod without
an ExceptionCheck in between, which -Xcheck:jni flags as 'JNI call
made without checking exceptions'. If retrieving the message itself
throws, we now clear the secondary exception, release the local refs
and fall back to an empty string. example3 runs warning-free.
The stock idiom cannot break the way the helper did in 89a38c3, and
subclasses failing to override now raise the standard exception with
the offending class name.
@mergify

mergify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Runs giws on every example XML with the same flags as the example's
Makefile and checks the generated C++: generation succeeds, non-static
methods get the post-call exception check, and the GiwsException
helpers check for pending exceptions after each CallObjectMethod.
Plus a few CLI behavior tests. No JDK needed, runs in under a second.
Regression test for the missing exception check on non-static
methods: main returns 0 only if the IllegalStateException thrown by
the non-static Java method is caught as a C++ JniException. Wired
into the examples build and the test suite.
Fold lint.yml into ci.yml so pull requests get ruff (check + format)
and the pytest suite alongside the examples build; PRs against any
branch now trigger it.
@sylvestre
sylvestre merged commit b6a2a2a into main Aug 7, 2026
7 checks passed
@sylvestre
sylvestre deleted the prep branch August 7, 2026 06:52
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