RFR: 8281560: Matcher.hitEnd returns unexpected results in presence of CANON_EQ flag. [v2]

Lance Andersen lancea at openjdk.java.net
Mon Mar 7 23:09:06 UTC 2022


On Mon, 7 Mar 2022 22:29:29 GMT, Ian Graves <igraves at openjdk.org> wrote:

>> Fixing a bug in `NFCCharProperty` where code falling through an if-statement can prematurely set the matcher's `hitEnd` field to true.
>
> Ian Graves has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
> 
>  - merging master
>  - Catching erronious setting of matcher.hitEnd

src/java.base/share/classes/java/util/regex/Pattern.java line 4009:

> 4007:                     return false;
> 4008:             }
> 4009:             else {

Is there a reason the "else" starts on its own line?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7466


More information about the core-libs-dev mailing list