On Thu, 17 Oct 2024 20:14:05 GMT, Justin Lu <j...@openjdk.org> wrote:
> Please review this PR which improves the readObject logic for > _j.text.MessageFormat_. > > No offset should be larger than the pattern length. We already ensure the > offsets when consumed backwards are equal/descending. The existing > first/initial check was off by 1 since it was checking against the pattern > length + 1; (see L2040 and L2043). > > Please see the JBS issue for further info and other test details. LGTM test/jdk/java/text/Format/MessageFormat/SerializationTest.java line 79: > 77: new MessageFormat("X{0}"), > 78: // Offset 1 under pattern length (variation) > 79: new MessageFormat("X{0}X") Nit: "(variation)" may not be needed ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21570#pullrequestreview-2378800482 PR Review Comment: https://git.openjdk.org/jdk/pull/21570#discussion_r1806915646