8037397: RegEx pattern matching loses character class after intersection (&&) operator

Reviewed-by: rriggs
This commit is contained in:
Ian Graves 2021-04-21 15:45:52 +00:00 committed by Roger Riggs
parent 07a7510d87
commit b337f63361
2 changed files with 41 additions and 3 deletions

View file

@ -2663,7 +2663,11 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
right = right.union(clazz(true));
} else { // abc&&def
unread();
right = clazz(false);
if (right == null) {
right = clazz(false);
} else {
right = right.union(clazz(false));
}
}
ch = peek();
}