mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-23 04:57:58 +01:00
Do not hardcode the char[] length in StringUtils
This commit is contained in:
parent
8b16c49a31
commit
e469601468
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,7 @@ public class StringUtils {
|
|||
// Create a char buffer to put random letters and numbers in.
|
||||
char [] randBuffer = new char[length];
|
||||
for (int i=0; i<randBuffer.length; i++) {
|
||||
randBuffer[i] = numbersAndLetters[randGen.nextInt(71)];
|
||||
randBuffer[i] = numbersAndLetters[randGen.nextInt(numbersAndLetters.length)];
|
||||
}
|
||||
return new String(randBuffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue