Unsafe call to 'Class.newInstance()'
Reports calls to
This method propagates exceptions thrown by the no-arguments constructor, including checked exceptions. Usages of this method effectively bypass the compile-time exception checking that would otherwise be performed by the compiler.
A quick-fix is suggested to replace the call with a call to the
java.lang.reflect.Constructor.newInstance() method, which avoids this problem by wrapping any exception thrown by the constructor in a (checked)
After the quick-fix is applied:
IntelliJ IDEA 2023.3, Qodana for JVM 2023.3