Conversation
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.
|
Tick the box to add this pull request to the merge queue (same as
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.