You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2012/06/10 14:13:43 UTC
[jira] [Created] (LANG-807) RandomStringUtils throws confusing IAE
when end <= start
Sebb created LANG-807:
-------------------------
Summary: RandomStringUtils throws confusing IAE when end <= start
Key: LANG-807
URL: https://issues.apache.org/jira/browse/LANG-807
Project: Commons Lang
Issue Type: Bug
Reporter: Sebb
Assignee: Sebb
Priority: Minor
RandomUtils invokes Random#nextInt(n) where n = end - start.
If end <= start, then Random throws:
java.lang.IllegalArgumentException: n must be positive
This is confusing, and does not identify the source of the problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (LANG-807) RandomStringUtils throws confusing IAE
when end <= start
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb updated LANG-807:
----------------------
Affects Version/s: 2.6
3.1
> RandomStringUtils throws confusing IAE when end <= start
> --------------------------------------------------------
>
> Key: LANG-807
> URL: https://issues.apache.org/jira/browse/LANG-807
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.6, 3.1
> Reporter: Sebb
> Assignee: Sebb
> Priority: Minor
>
> RandomUtils invokes Random#nextInt(n) where n = end - start.
> If end <= start, then Random throws:
> java.lang.IllegalArgumentException: n must be positive
> This is confusing, and does not identify the source of the problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (LANG-807) RandomStringUtils throws confusing IAE
when end <= start
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved LANG-807.
-----------------------
Resolution: Fixed
Fix Version/s: 2.7
3.2
> RandomStringUtils throws confusing IAE when end <= start
> --------------------------------------------------------
>
> Key: LANG-807
> URL: https://issues.apache.org/jira/browse/LANG-807
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.6, 3.1
> Reporter: Sebb
> Assignee: Sebb
> Priority: Minor
> Fix For: 3.2, 2.7
>
>
> RandomUtils invokes Random#nextInt(n) where n = end - start.
> If end <= start, then Random throws:
> java.lang.IllegalArgumentException: n must be positive
> This is confusing, and does not identify the source of the problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira