mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
move Pattern.quote and Pattern.LITERAL models to Regex.qll
This commit is contained in:
@@ -7,6 +7,22 @@ class TypeRegexPattern extends Class {
|
||||
TypeRegexPattern() { this.hasQualifiedName("java.util.regex", "Pattern") }
|
||||
}
|
||||
|
||||
/** The `quote` method of the `java.util.regex.Pattern` class. */
|
||||
class PatternQuoteMethod extends Method {
|
||||
PatternQuoteMethod() {
|
||||
this.getDeclaringType() instanceof TypeRegexPattern and
|
||||
this.hasName(["quote"])
|
||||
}
|
||||
}
|
||||
|
||||
/** The `LITERAL` field of the `java.util.regex.Pattern` class. */
|
||||
class PatternLiteral extends Field {
|
||||
PatternLiteral() {
|
||||
this.getDeclaringType() instanceof TypeRegexPattern and
|
||||
this.hasName("LITERAL")
|
||||
}
|
||||
}
|
||||
|
||||
private class RegexModel extends SummaryModelCsv {
|
||||
override predicate row(string s) {
|
||||
s =
|
||||
|
||||
@@ -92,19 +92,6 @@ private class PatternRegexMethod extends Method {
|
||||
}
|
||||
}
|
||||
|
||||
/** The `quote` method of the `java.util.regex.Pattern` class. */
|
||||
private class PatternQuoteMethod extends Method {
|
||||
PatternQuoteMethod() { this.hasName(["quote"]) }
|
||||
}
|
||||
|
||||
/** The `LITERAL` field of the `java.util.regex.Pattern` class. */
|
||||
private class PatternLiteral extends Field {
|
||||
PatternLiteral() {
|
||||
this.getDeclaringType() instanceof TypeRegexPattern and
|
||||
this.hasName("LITERAL")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The methods of the class `org.apache.commons.lang3.RegExUtils` that take
|
||||
* a regular expression of type `String` as a parameter.
|
||||
|
||||
Reference in New Issue
Block a user