On Tue, 26 Sep 2023 14:06:56 GMT, Aleksei Voitylov <avoity...@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. > > Aleksei Voitylov has updated the pull request incrementally with one > additional commit since the last revision: > > Update src/java.base/share/classes/java/lang/String.java > > Co-authored-by: Raffaello Giulietti <raffaello.giulie...@oracle.com> src/java.base/share/classes/java/lang/String.java line 2162: > 2160: if (len < 0) { > 2161: return true; > 2162: } Isn't it also true that the regions trivial match if len == 0? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15906#discussion_r1337310557