1.fix nickName header range

main
Gary 5 months ago
parent 5b55d45601
commit b84bfc8ec5

@ -51,7 +51,7 @@ public class NickNameUtil2 {
StringBuilder sb = new StringBuilder();
Random random = new Random();
int headerIndex = random.nextInt(header.length);
int headerIndex = random.nextInt(header2.length);
sb.append(header2[headerIndex]);
sb.append("的");
int suffixIndex = random.nextInt(suffix.length);

@ -7,7 +7,7 @@ import org.junit.Test;
public class NickNameUtil2Test {
@Test
public void test() {
int total = 10000000;
int total = 1000000;
System.out.println("total: " + total);
IntStream.range(0, total).parallel().mapToObj(j -> NickNameUtil2.generateRandomString()).limit(10)
.forEach(System.out::println);

Loading…
Cancel
Save