Java: Add isNotEmpty to NullGuards

This commit is contained in:
Robin Neatherway
2019-07-05 12:41:46 +01:00
parent a0dc84010a
commit 204a28df94

View File

@@ -120,6 +120,14 @@ predicate nullCheckMethod(Method m, boolean branch, boolean isnull) {
m.hasName("isBlank") and
branch = false and
isnull = false
or
(
m.getDeclaringType().hasQualifiedName("org.apache.commons.collections4", "CollectionUtils") or
m.getDeclaringType().hasQualifiedName("org.apache.commons.collections", "CollectionUtils")
) and
m.hasName("isNotEmpty") and
branch = true and
isnull = false
}
/**