21 lines
265 B
Plaintext
21 lines
265 B
Plaintext
![]() |
include::../description.adoc[]
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
if ((str = cont.substring(pos1, pos2)) != '') { // Noncompliant
|
||
|
//...
|
||
|
}
|
||
|
----
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
----
|
||
|
str = cont.substring(pos1, pos2);
|
||
|
if (str != '') {
|
||
|
//...
|
||
|
}
|
||
|
----
|
||
|
|
||
|
include::../see.adoc[]
|