Files
openide/plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyConditionalWithIdenticalBranches.html
Daniil Ovchinnikov ee64710f73 [groovy] inspection descriptions
GroovyBreak
GroovyConditional
GroovyConditionalCanBeConditionalCall
GroovyConditionalCanBeElvis
GroovyConditionalWithIdenticalBranches
GroovyContinue
GroovyContinueOrBreakFromFinallyBlock
GrEqualsBetweenInconvertibleTypes
GrFinalVariableAccess
GrMethodMayBeStatic
GrNamedVariantLabels
GroovyAccessibility

GitOrigin-RevId: 7e8b924a88f98e61918478174810bb4fe50cc9ed
2021-05-31 18:07:02 +00:00

15 lines
384 B
HTML

<html>
<body>
Reports ternary expressions with identical "then" and "else" branches. Such expressions are almost certainly a programmer error.
<p>The quick-fix replaces the expression with its "then" branch.</p>
<p><b>Example:</b></p>
<pre><code>
condition ? a.foo() : a.foo()
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
a.foo()
</code></pre>
</body>
</html>