2626import java .util .List ;
2727import java .util .function .Supplier ;
2828
29+ import static java .lang .Character .toUpperCase ;
30+ import static java .util .Arrays .asList ;
2931import static net .andreinc .mockneat .alphabets .Alphabets .*;
3032import static net .andreinc .mockneat .types .enums .DictType .*;
3133import static net .andreinc .mockneat .types .enums .PassStrengthType .*;
@@ -107,7 +109,7 @@ private String nextMediumPassword() {
107109 // Create a objs uppercase character
108110 int randUpperCaseIdx = mockNeat .ints ().range (0 , noun .length () - 1 ).val ();
109111 char replChar = resultBuff .charAt (randUpperCaseIdx );
110- resultBuff .setCharAt (randUpperCaseIdx , Character . toUpperCase (replChar ));
112+ resultBuff .setCharAt (randUpperCaseIdx , toUpperCase (replChar ));
111113
112114 // Insert / Replace with a objs special character
113115 int randSpecialChrIdx = mockNeat .ints ().range (0 , resultBuff .length ()).val ();
@@ -129,8 +131,9 @@ private String nextStrongPassword() {
129131 int passLength = mockNeat .ints ().range (minLength , maxLength ).val ();
130132 StringBuilder buff = new StringBuilder ();
131133 List <Character > cAlph ;
134+ List <List <Character >> lists = asList (new List []{SPECIAL_CHARACTERS , DIGITS , LETTERS });
132135 while (passLength -- > 1 ) {
133- cAlph = mockNeat .from (new List []{ SPECIAL_CHARACTERS , DIGITS , LETTERS } ).val ();
136+ cAlph = mockNeat .from (lists ).val ();
134137 buff .append (mockNeat .from (cAlph ).val ());
135138 }
136139 // Insert a special character to be 100% confident it exists
0 commit comments