Java: Tighter model of HostnameVerifier#verify

This more tightly models `HostnameVerifier#verify` previously it
was possible to accidentally match other methods called `verify`.
This commit is contained in:
intrigus
2020-12-09 23:37:29 +01:00
parent 0a9df07df7
commit e021158b5f

View File

@@ -29,13 +29,20 @@ class SSLContext extends RefType {
SSLContext() { hasQualifiedName("javax.net.ssl", "SSLContext") }
}
class SSLSession extends RefType {
SSLSession() { hasQualifiedName("javax.net.ssl", "SSLSession") }
}
class HostnameVerifier extends RefType {
HostnameVerifier() { hasQualifiedName("javax.net.ssl", "HostnameVerifier") }
}
class HostnameVerifierVerify extends Method {
HostnameVerifierVerify() {
hasName("verify") and getDeclaringType().getASupertype*() instanceof HostnameVerifier
hasName("verify") and
getDeclaringType().getASupertype*() instanceof HostnameVerifier and
getParameterType(0) instanceof TypeString and
getParameterType(1) instanceof SSLSession
}
}