Is there any tool for analyzing static code that detects errors in the JNI (method) signature lines? For example, the following code is not syntactically correct (there is no semicolon after the full class name):
(*env)->GetMethodID(env, someClassId, "aMethod","(ILfoo/bar/TheClass)V");
edit: The code analysis tool does not need to check for the existence of foo / bar / TheClass, but only checks the string for valid syntax according to the JNI specification.
This question is based on the fact that the code above caused a segmentation error. This is always an annoying debugging situation, but static analysis should be fairly easy, in this case save a lot of time.
source share