@@ -152,21 +152,21 @@ private static Map<String, byte[]> strings() {
152152 DecoderTest .addTestString (strings , new byte []{0x5d , 0x0 },
153153 "12345678901234567890123456789" );
154154 DecoderTest .addTestString (strings , new byte []{0x5d , (byte ) 128 },
155- DecoderTest . xString (157 ));
155+ "x" . repeat (157 ));
156156
157157 DecoderTest
158158 .addTestString (strings , new byte []{0x5d , 0x0 , (byte ) 0xd7 },
159- DecoderTest . xString (500 ));
159+ "x" . repeat (500 ));
160160
161161 DecoderTest
162162 .addTestString (strings , new byte []{0x5e , 0x0 , (byte ) 0xd7 },
163- DecoderTest . xString (500 ));
163+ "x" . repeat (500 ));
164164 DecoderTest .addTestString (strings ,
165165 new byte []{0x5e , 0x6 , (byte ) 0xb3 },
166- DecoderTest . xString (2000 ));
166+ "x" . repeat (2000 ));
167167 DecoderTest .addTestString (strings ,
168168 new byte []{0x5f , 0x0 , 0x10 , 0x53 ,},
169- DecoderTest . xString (70000 ));
169+ "x" . repeat (70000 ));
170170
171171 return strings ;
172172
@@ -187,14 +187,6 @@ private static Map<byte[], byte[]> bytes() {
187187 return bytes ;
188188 }
189189
190- private static String xString (int length ) {
191- StringBuilder sb = new StringBuilder ();
192- for (int i = 0 ; i < length ; i ++) {
193- sb .append ("x" );
194- }
195- return sb .toString ();
196- }
197-
198190 private static void addTestString (Map <String , byte []> tests , byte ctrl ,
199191 String str ) {
200192 DecoderTest .addTestString (tests , new byte []{ctrl }, str );
0 commit comments