mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
GroovyBreak GroovyConditional GroovyConditionalCanBeConditionalCall GroovyConditionalCanBeElvis GroovyConditionalWithIdenticalBranches GroovyContinue GroovyContinueOrBreakFromFinallyBlock GrEqualsBetweenInconvertibleTypes GrFinalVariableAccess GrMethodMayBeStatic GrNamedVariantLabels GroovyAccessibility GitOrigin-RevId: 7e8b924a88f98e61918478174810bb4fe50cc9ed
18 lines
338 B
HTML
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>
|