@@ -1718,28 +1718,27 @@ void testRepeat_StringInt() {
17181718 final String str = StringUtils .repeat ("a" , 10000 ); // bigger than pad limit
17191719 assertEquals (10000 , str .length ());
17201720 assertTrue (StringUtils .containsOnly (str , 'a' ));
1721+ assertThrows (IllegalArgumentException .class , () -> StringUtils .repeat ("aa" , 1_073_741_824 ));
17211722 }
17221723
17231724 @ Test
17241725 void testRepeat_StringStringInt () {
17251726 assertNull (StringUtils .repeat (null , null , 2 ));
17261727 assertNull (StringUtils .repeat (null , "x" , 2 ));
17271728 assertEquals ("" , StringUtils .repeat ("" , null , 2 ));
1728-
17291729 assertEquals ("" , StringUtils .repeat ("ab" , "" , 0 ));
17301730 assertEquals ("" , StringUtils .repeat ("" , "" , 2 ));
1731-
17321731 assertEquals ("xx" , StringUtils .repeat ("" , "x" , 3 ));
1733-
17341732 assertEquals ("?, ?, ?" , StringUtils .repeat ("?" , ", " , 3 ));
1733+ assertThrows (IllegalArgumentException .class , () -> StringUtils .repeat ("?" , ", " , 1_073_741_824 ));
17351734 }
17361735
17371736 /**
17381737 * Test method for 'StringUtils.replaceEach(String, String[], String[])'
17391738 */
17401739 @ Test
17411740 void testReplace_StringStringArrayStringArray () {
1742- //JAVADOC TESTS START
1741+ // JAVADOC TESTS START
17431742 assertNull (StringUtils .replaceEach (null , new String []{"a" }, new String []{"b" }));
17441743 assertEquals (StringUtils .replaceEach ("" , new String []{"a" }, new String []{"b" }), "" );
17451744 assertEquals (StringUtils .replaceEach ("aba" , null , null ), "aba" );
@@ -1751,7 +1750,7 @@ void testReplace_StringStringArrayStringArray() {
17511750 assertEquals (StringUtils .replaceEach ("aba" , new String []{null }, new String []{"a" }), "aba" );
17521751 assertEquals (StringUtils .replaceEach ("abcde" , new String []{"ab" , "d" }, new String []{"w" , "t" }), "wcte" );
17531752 assertEquals (StringUtils .replaceEach ("abcde" , new String []{"ab" , "d" }, new String []{"d" , "t" }), "dcte" );
1754- //JAVADOC TESTS END
1753+ // JAVADOC TESTS END
17551754
17561755 assertEquals ("bcc" , StringUtils .replaceEach ("abc" , new String []{"a" , "b" }, new String []{"b" , "c" }));
17571756 assertEquals ("q651.506bera" , StringUtils .replaceEach ("d216.102oren" ,
0 commit comments