blob: 3ead9806593110b80775c4e03495975ad4b92c57 [file] [log] [blame]
<html>
<body>
Reports any calls to
<b>java.lang.Class.newInstance()</b>.
The <b>newInstance</b> method propagates any
exception thrown by the no-arg constructor, including checked exceptions. Use
of this method effectively bypasses the compile-time exception checking that
would otherwise be performed by the compiler. Replacing such a method call with
a call to the <b>java.lang.reflect.Constructor.newInstance()</b>
method avoids this problem by wrapping any exception thrown by the constructor
in a <b>java.lang.reflect.InvocationTargetException</b>.
<!-- tooltip end -->
<p>
</body>
</html>