mirror of
https://github.com/github/codeql.git
synced 2026-02-28 21:03:50 +01:00
Java: Add isNotEmpty to NullGuards
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user