Release Note: `java.util.regex.MatchResult` Might Throw `StringIndexOutOfBoundsException` on Regex Patterns Containing Lookaheads and Lookbehinds

XMLWordPrintable

      JDK-8132995 introduced an unintended regression when using instances returned by `java.util.regex.Matcher.toMatchResult()`.

      This happens on `java.util.regex.Pattern`s containing lookaheads and lookbehinds that, in turn, contain groups. If these are located outside the match, it results in throwing `StringIndexOutOfBoundsException` when accessing these groups. See JDK-8312976 for an example.

            Assignee:
            Raffaello Giulietti
            Reporter:
            Raffaello Giulietti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: