@@ -41,7 +41,7 @@ public class HelpFormatterTest {
4141 private static final String EOL = System .lineSeparator ();
4242
4343 static Stream <Arguments > deprecatedOptionsProvider () {
44- List <Arguments > lst = new ArrayList <>();
44+ final List <Arguments > lst = new ArrayList <>();
4545 Option option = Option .builder ("a" ).longOpt ("aaa" ).desc ("dddd dddd dddd" )
4646 .deprecated (DeprecatedAttributes .builder ().setForRemoval (true ).setSince ("now" )
4747 .setDescription ("Why why why" ).get ())
@@ -409,14 +409,14 @@ public void testPrintDeprecatedOptions(final HelpFormatter hf, final Option opti
409409 final String lpad = hf .createPadding (leftPad );
410410 final String dpad = hf .createPadding (descPad );
411411 Options options ;
412- String expected = lpad + "-a,--aaa" ;
412+ StringBuilder expected = new StringBuilder (). append ( lpad ). append ( "-a,--aaa" ) ;
413413
414414 options = new Options ().addOption (option );
415415 if (expectedTxt .length () > 0 ) {
416- expected = expected + dpad + expectedTxt ;
416+ expected . append ( dpad ). append ( expectedTxt ) ;
417417 }
418418 hf .renderOptions (sb , 160 , options , leftPad , descPad );
419- assertEquals (expected , sb .toString ());
419+ assertEquals (expected . toString () , sb .toString ());
420420 }
421421
422422 @ Test
0 commit comments