All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.java.rules.squid.S1940.html Maven / Gradle / Ivy

It is needlessly complex to invert the result of a boolean comparison. The opposite comparison should be made instead.

Noncompliant Code Example

if ( !(a == 2)) { ...}  // Noncompliant
boolean b = !(i < 10);  // Noncompliant

Compliant Solution

if (a != 2) { ...}
boolean b = (i >= 10);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy