File tree Expand file tree Collapse file tree
java/ql/lib/semmle/code/java/regex Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments