summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html
blob: 398d5cbb1b596060708749d4481f16b5dadc2402 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<html>
<body>
This inspection is intended for J2ME and other highly resource constrained environments.
Applying the results of this inspection without consideration might have negative effects on code clarity and design.
<p>
Reports if statements of the form
<b>if (<i>condition</i>) return true else return <i>foo</i></b>
or <b>if (<i>condition</i>) return false else return <i>foo</i></b>.
These expressions may be safely simplified to
<b>return <i>condition</i> && <i>foo</i></b> or
<b>return !<i>condition</i> || <i>foo</i></b>, respectively.
  <!-- tooltip end -->
<p>

</body>
</html>