Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca422a2

Browse files
Use explicit this
1 parent f9f7a01 commit ca422a2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

java/ql/lib/semmle/code/java/regex/RegexTreeView.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ class RegExpEscape extends RegExpNormalChar {
495495
/**
496496
* Holds if this is a unicode escape.
497497
*/
498-
private predicate isUnicode() { this.getText().prefix(2) = "\\u" }
498+
private predicate isUnicode() { this.getText().matches("\\u%") }
499499

500500
/**
501501
* Gets the unicode char for this escape.

java/ql/lib/semmle/code/java/regex/regex.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class RegexString extends Expr {
2121
private predicate char_set_end0(int pos) {
2222
this.nonEscapedCharAt(pos) = "]" and
2323
/* special case: `[]]` and `[^]]` are valid char classes. */
24-
not char_set_start0(_, pos - 1)
24+
not this.char_set_start0(_, pos - 1)
2525
}
2626

2727
/**
@@ -64,7 +64,7 @@ abstract class RegexString extends Expr {
6464
end = inner_end + 1 and
6565
inner_end > inner_start and
6666
this.char_set_end(inner_end) and
67-
not exists(int mid | char_set_end(mid) | mid > inner_start and mid < inner_end)
67+
not exists(int mid | this.char_set_end(mid) | mid > inner_start and mid < inner_end)
6868
)
6969
}
7070

@@ -304,7 +304,7 @@ abstract class RegexString extends Expr {
304304
// 16-bit hex value \uhhhh
305305
this.getChar(start + 1) = "u" and end = start + 6
306306
or
307-
escapedBraces(start, end)
307+
this.escapedBraces(start, end)
308308
or
309309
// Boundry matchers \b, \b{g}
310310
this.getChar(start + 1) = "b" and

0 commit comments

Comments
 (0)