1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

StringUtils: Make randGen and numbersAndLetters final

This commit is contained in:
Florian Schmaus 2016-01-10 18:23:06 +01:00
parent 7a8d66e9e6
commit ac0c05be04

View file

@ -151,7 +151,7 @@ public class StringUtils {
* The Random class is not considered to be cryptographically secure, so * The Random class is not considered to be cryptographically secure, so
* only use these random Strings for low to medium security applications. * only use these random Strings for low to medium security applications.
*/ */
private static Random randGen = new Random(); private static final Random randGen = new Random();
/** /**
* Array of numbers and letters of mixed case. Numbers appear in the list * Array of numbers and letters of mixed case. Numbers appear in the list
@ -159,7 +159,7 @@ public class StringUtils {
* We can use the array to get a random number or letter by picking a random * We can use the array to get a random number or letter by picking a random
* array index. * array index.
*/ */
private static char[] numbersAndLetters = ("0123456789abcdefghijklmnopqrstuvwxyz" + private static final char[] numbersAndLetters = ("0123456789abcdefghijklmnopqrstuvwxyz" +
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ").toCharArray(); "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ").toCharArray();
/** /**