mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8276694: Pattern trailing unescaped backslash causes internal error
Reviewed-by: jlaskey
This commit is contained in:
parent
36f41cbe11
commit
3aaa0982d8
2 changed files with 12 additions and 1 deletions
|
@ -1795,6 +1795,8 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
|
|||
if (patternLength != cursor) {
|
||||
if (peek() == ')') {
|
||||
throw error("Unmatched closing ')'");
|
||||
} else if (cursor == patternLength + 1 && temp[patternLength - 1] == '\\') {
|
||||
throw error("Unescaped trailing backslash");
|
||||
} else {
|
||||
throw error("Unexpected internal error");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue