Description
I faced that the random method can cause an infinite loop. It can be caused if the end parameter is too low for generating either numbers (< 48) or letters (<65). I added some exception tests to make the cases clear. Basically, if we call the random function with for example numbers = true && end < 48 the validation for Character.isDigit(ch) will fail and we increment count count++.
Ivan Morozov https://github.com/apache/commons-lang/pull/211