mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
28 lines
1.3 KiB
HTML
28 lines
1.3 KiB
HTML
<html>
|
|
<body>
|
|
Reports exceptions that are declared in a method's signature but never thrown by the method itself or its implementations and overriding methods.
|
|
<p>The inspection ignores methods related to serialization, for example the methods <code>readObject()</code> and <code>writeObject()</code>.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
void method() throws InterruptedException {
|
|
System.out.println();
|
|
}
|
|
</code></pre>
|
|
<p>The quick-fix removes unnecessary exceptions from the declaration and normalizes redundant <code>try</code>-<code>catch</code> statements:</p>
|
|
<pre><code>
|
|
void method() {
|
|
System.out.println();
|
|
}
|
|
</code></pre>
|
|
<p>
|
|
<b>Note:</b> Some exceptions may not be reported during in-editor highlighting for performance reasons.
|
|
To see all results, run the inspection by selecting <b>Code | Inspect Code</b> or <b>Code | Analyze Code | Run Inspection by Name</b> from the main menu.
|
|
</p>
|
|
<!-- tooltip end -->
|
|
<p>Use the <b>Ignore exceptions thrown by entry point methods</b> option to not report exceptions thrown by
|
|
for example <code>main()</code> methods.
|
|
Entry point methods can be configured in the settings of the
|
|
<a href="settings://Errors?Unused%20Declaration%20entry%20point">Java | Declaration redundancy | Unused declaration</a> inspection.
|
|
<br><br></p>
|
|
</body>
|
|
</html> |