forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMail.qll
More file actions
27 lines (23 loc) · 744 Bytes
/
Copy pathMail.qll
File metadata and controls
27 lines (23 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/** Provides classes and predicates to work with email */
import java
/**
* The class `javax.mail.Session` or `jakarta.mail.Session`.
*/
class MailSession extends Class {
MailSession() { this.hasQualifiedName(["javax.mail", "jakarta.mail"], "Session") }
}
/**
* The method `getInstance` of the classes `javax.mail.Session` or `jakarta.mail.Session`.
*/
class MailSessionGetInstanceMethod extends Method {
MailSessionGetInstanceMethod() {
this.getDeclaringType() instanceof MailSession and
this.getName() = "getInstance"
}
}
/**
* A subtype of the class `org.apache.commons.mail.Email`.
*/
class ApacheEmail extends Class {
ApacheEmail() { this.getASupertype*().hasQualifiedName("org.apache.commons.mail", "Email") }
}