Skip to content

Commit fc44573

Browse files
committed
Java: Use hasQualifiedName rather than getQualifiedName in ExternalAPIs
It's more efficient, as it doesn't require building intermediate strings.
1 parent bc7fcaa commit fc44573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/lib/semmle/code/java/security/ExternalAPIs.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private class DefaultSafeExternalApiMethod extends SafeExternalApiMethod {
2424
or
2525
this.getDeclaringType().hasQualifiedName("org.apache.commons.lang3", "Validate")
2626
or
27-
this.getQualifiedName() = "Objects.equals"
27+
this.hasQualifiedName("java.util", "Objects", "equals")
2828
or
2929
this.getDeclaringType() instanceof TypeString and this.getName() = "equals"
3030
or

0 commit comments

Comments
 (0)