Make private constructors package-private because code-analyzers
complain about it because they cannot see that JNI is creating the
classes.
Fix wrong exception throwing
Code cleanup
Code cleanup
Add final modifier to param