Skip to content

Commit 738d5a9

Browse files
committed
Fix lgtm warning.
1 parent a4859d0 commit 738d5a9

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/github/underscore

1 file changed

+1
-1
lines changed

src/main/java/com/github/underscore/U.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,7 @@ public static String uniquePassword() {
20602060
final long passwordLength = Math.abs(UUID.randomUUID().getLeastSignificantBits() % MIN_PASSWORD_LENGTH_8)
20612061
+ MIN_PASSWORD_LENGTH_8;
20622062
for (int index = 0; index < passwordLength; index += 1) {
2063-
final int passIndex = (int) (passwords.length * index / passwordLength);
2063+
final int passIndex = (int) (passwords.length * (long) index / passwordLength);
20642064
final int charIndex = (int) Math.abs(
20652065
UUID.randomUUID().getLeastSignificantBits() % passwords[passIndex].length());
20662066
result.append(passwords[passIndex].charAt(charIndex));

0 commit comments

Comments
 (0)