Skip to content

Commit fe38cb3

Browse files
tobias-lippertphilwebb
authored andcommitted
Use string.repeat()
See gh-39259
1 parent ddb769b commit fe38cb3

File tree

1 file changed

+1
-3
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/zip

1 file changed

+1
-3
lines changed

Diff for: spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/zip/ZipStringTests.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ void startsWithWhenDoesNotStartWith() throws Exception {
168168
@Test
169169
void zipStringWhenMultiCodePointAtBufferBoundary() throws Exception {
170170
StringBuilder source = new StringBuilder();
171-
for (int i = 0; i < ZipString.BUFFER_SIZE - 1; i++) {
172-
source.append("A");
173-
}
171+
source.append("A".repeat(ZipString.BUFFER_SIZE - 1));
174172
source.append("\u1EFF");
175173
String charSequence = source.toString();
176174
source.append("suffix");

0 commit comments

Comments
 (0)