| <html> |
| <body> |
| Reports methods with a <b>boolean</b> return type, which are only used in a negated context. |
| Because this inspection requires global code analysis it is only available for <em>Analyze|Inspect Code</em> or |
| <em>Analyze|Run Inspection by Name</em> and it will not report in the editor. |
| <p> |
| For example: |
| <code><pre> |
| <b>class</b> C { |
| <b>boolean</b> inverted() { |
| <b>return</b> <b>true</b>; |
| } |
| |
| <b>void</b> f() { |
| <b>if</b> (!inverted()) { |
| <b>return</b>; |
| } |
| } |
| <b>boolean</b> member = !inverted(); |
| } |
| </pre></code> |
| <!-- tooltip end --> |
| <p> |
| |
| </body> |
| </html> |