Skip to content

Commit

Permalink
Use '-Xcheck:jni' during testsuite run to detect JNI bugs (java-nativ…
Browse files Browse the repository at this point in the history
…e-access#589)

Motivation:

We should run our testsuite with '-Xcheck:jni' to ensure we catch bugs
in our JNI code which could later cause issues like crashes

Modifications:

- Add -Xcheck:jni
- Add -ea

Result:

Testsuite will be able to catch more JNI bugs
  • Loading branch information
normanmaurer authored Sep 27, 2023
1 parent 860921c commit 6686a48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@
</systemPropertyVariables>
<!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
<trimStackTrace>false</trimStackTrace>
<argLine>${test.argLine}</argLine>
<!-- Always check JNI during test run so we catch bugs that could cause crashes -->
<argLine>-ea -Xcheck:jni ${test.argLine}</argLine>
</configuration>
</plugin>
<!-- always produce osgi bundles -->
Expand Down

0 comments on commit 6686a48

Please sign in to comment.