mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8217496: Matcher.group() can return null after usePattern
Reviewed-by: smarks
This commit is contained in:
parent
45a616a891
commit
ac3ab5b007
1 changed files with 6 additions and 2 deletions
|
@ -607,7 +607,9 @@ public final class Matcher implements MatchResult {
|
|||
* successfully matches the empty string in the input. </p>
|
||||
*
|
||||
* @return The (possibly empty) subsequence matched by the previous match,
|
||||
* in string form
|
||||
* in string form or {@code null} if a matcher with a previous
|
||||
* match has changed its {@link java.util.regex.Pattern},
|
||||
* but no new match has yet been attempted
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* If no match has yet been attempted,
|
||||
|
@ -643,7 +645,9 @@ public final class Matcher implements MatchResult {
|
|||
*
|
||||
* @return The (possibly empty) subsequence captured by the group
|
||||
* during the previous match, or {@code null} if the group
|
||||
* failed to match part of the input
|
||||
* failed to match part of the input or if the matcher's
|
||||
* {@link java.util.regex.Pattern} has changed after a
|
||||
* successful match, but a new match has not been attempted
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* If no match has yet been attempted,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue