mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
use set literals instead of big disjunctions
This commit is contained in:
@@ -101,12 +101,7 @@ class Struts2ConventionActionClass extends Class {
|
||||
exists(string ancestorPackage |
|
||||
// Has an ancestor package on the whitelist
|
||||
ancestorPackage = this.getPackage().getName().splitAt(".") and
|
||||
(
|
||||
ancestorPackage = "struts" or
|
||||
ancestorPackage = "struts2" or
|
||||
ancestorPackage = "action" or
|
||||
ancestorPackage = "actions"
|
||||
)
|
||||
ancestorPackage = ["struts", "struts2", "action", "actions"]
|
||||
) and
|
||||
(
|
||||
this.getName().matches("%" + getConventionSuffix(this)) or
|
||||
|
||||
@@ -7,12 +7,7 @@ import semmle.code.java.dataflow.SSA
|
||||
* The kind of bound that is known to hold for some variable.
|
||||
*/
|
||||
library class BoundKind extends string {
|
||||
BoundKind() {
|
||||
this = "=" or
|
||||
this = "!=" or
|
||||
this = ">=" or
|
||||
this = "<="
|
||||
}
|
||||
BoundKind() { this = ["=", "!=", ">=", "<="] }
|
||||
|
||||
predicate isEqual() { this = "=" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user