Skip to content

Commit 8760f32

Browse files
committed
Use Arrays.fill() in RopeConstants
1 parent 40a2425 commit 8760f32

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/truffleruby/core/rope/RopeConstants.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
package org.truffleruby.core.rope;
1111

12+
import java.util.Arrays;
1213
import java.util.HashMap;
1314
import java.util.Map;
1415

@@ -154,9 +155,7 @@ private static LeafRope[] createPaddingZeroTable() {
154155
for (int n = 0; n < table.length; n++) {
155156
final byte[] bytes = new byte[n];
156157

157-
for (int i = 0; i < bytes.length; i++) {
158-
bytes[i] = '0';
159-
}
158+
Arrays.fill(bytes, (byte) '0');
160159

161160
table[n] = new AsciiOnlyLeafRope(bytes, UTF8Encoding.INSTANCE);
162161
}

0 commit comments

Comments
 (0)