RFR: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

Volker Simonis simonis at openjdk.org
Mon Sep 25 18:34:34 UTC 2023


On Mon, 25 Sep 2023 15:52:12 GMT, Aleksei Voitylov <avoitylov at openjdk.org> wrote:

> test java.lang.String.RegionMatches1Tests fails on all platforms with -XX:-CompactStrings option and on ARM32 where Compact Strings is disabled by default. The fix is to return true immediately if len is negative, since for negative length this condition will never be satisfied.
> 
> Testing: JCK, JTREG passed with the fix with -XX:-CompactStrings on x86_64 and on ARM32.

Looks good.

PS: I specifically like the "*Looks simple and harmless*" [comment on the PR of the original change](https://github.com/openjdk/jdk/pull/12528#pullrequestreview-1295839377) :)

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

Marked as reviewed by simonis (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15906#pullrequestreview-1642774005


More information about the core-libs-dev mailing list