== Noncompliant Code Example

----
if (str == null && str.length() == 0) {
  System.out.println("String is empty");
}

if (str != null || str.length() > 0) {
  System.out.println("String is not empty");
}
----
