You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/06/09 00:49:11 UTC
DO NOT REPLY [Bug 20592] New: -
RandomStringUtils.randomAlpha methods omit 'z'
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20592>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20592
RandomStringUtils.randomAlpha methods omit 'z'
Summary: RandomStringUtils.randomAlpha methods omit 'z'
Product: Commons
Version: Nightly Builds
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Lang
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: phil@steitz.com
RandomStringUtils.randomAlphabetic and randomAlphanumeric will never include the
letter 'z' in a generated string. Similarly, randomAscii omits 127. The
attached patch fixes this problem and also does the following:
1. Fixes an error in the javadoc description of random(int count, int start, int
end, boolean letters, boolean numbers, char[] set)
2. Adds test cases to make sure that boundary characters ('0', 'a', 'Z', etc.)
are included in generated strings. The test cases will fail with the current
code, complaining that 'z' and 127 are never generated.
3. Changes the significance levels of the chi-square tests added earlier to
RandomUtilsTest. The patch changes all significance levels to .001, which will
reduce the incidence of random failure to 1 in 1000. They are currently all set
at .01.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org