mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8280403: RegEx: String.split can fail with NPE in Pattern.CharPredicate::match
Reviewed-by: lancea, iris, naoto, rriggs
This commit is contained in:
parent
52ddbe2dcd
commit
e3076552ec
2 changed files with 13 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -2689,6 +2689,8 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
|
|||
else
|
||||
prev = right;
|
||||
} else {
|
||||
if (curr == null)
|
||||
throw error("Bad intersection syntax");
|
||||
prev = prev.and(curr);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue