Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8132995 Matcher$ImmutableMatchResult should be optimized to reduce space usage
  3. JDK-8314055

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.

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

              Created:
              Updated:
              Resolved: