15 lines
293 B
Plaintext
15 lines
293 B
Plaintext
![]() |
When the same condition is checked twice in quick succession, it is probably inefficient, and likely an error. Usually, the intent was to check a different condition.
|
||
|
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
if (a.length() > 5) {
|
||
|
//...
|
||
|
}
|
||
|
if (a.length() > 5) { // Noncompliant
|
||
|
// ...
|
||
|
}
|
||
|
----
|
||
|
|