Files
openide/plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyConditionalCanBeConditionalCall.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

18 lines
338 B
HTML

<html>
<body>
Reports ternary expressions which can be replaced by a safe call.
<p><b>Example:</b></p>
<pre><code>
def charArray(String s) {
s == null ? null : s.toCharArray()
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
def charArray(String s) {
s?.toCharArray()
}
</code></pre>
</body>
</html>