mirror of
https://github.com/github/codeql.git
synced 2026-03-01 13:23:49 +01:00
Java: Deprecate StringLiteral.getRepresentedString()
This commit is contained in:
@@ -22,7 +22,7 @@ private predicate boxedToString(Method method) {
|
||||
* it is better to use a prepared query than to just put single quotes around the string.
|
||||
*/
|
||||
predicate endsInQuote(Expr expr) {
|
||||
exists(string str | str = expr.(StringLiteral).getRepresentedString() | str.matches("%'"))
|
||||
exists(string str | str = expr.(StringLiteral).getValue() | str.matches("%'"))
|
||||
or
|
||||
exists(Variable var | expr = var.getAnAccess() | endsInQuote(var.getAnAssignedValue()))
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user