Use string.repeat()

See gh-39259
This commit is contained in:
Tobias Lippert 2024-01-21 18:45:31 +01:00 committed by Phillip Webb
parent ddb769bf7f
commit fe38cb3b4a

View File

@ -168,9 +168,7 @@ class ZipStringTests {
@Test
void zipStringWhenMultiCodePointAtBufferBoundary() throws Exception {
StringBuilder source = new StringBuilder();
for (int i = 0; i < ZipString.BUFFER_SIZE - 1; i++) {
source.append("A");
}
source.append("A".repeat(ZipString.BUFFER_SIZE - 1));
source.append("\u1EFF");
String charSequence = source.toString();
source.append("suffix");