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

Reviewed-by: simonis, rgiulietti, rriggs
This commit is contained in:
Aleksei Voitylov 2023-09-28 18:11:40 +00:00 committed by Roger Riggs
parent ca5eee2fe3
commit cfcbfc6cae
2 changed files with 28 additions and 8 deletions

View file

@ -2156,6 +2156,10 @@ public final class String
(ooffset > (long)other.length() - len)) {
return false;
}
// Any strings match if len <= 0
if (len <= 0) {
return true;
}
byte[] tv = value;
byte[] ov = other.value;
byte coder = coder();