commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-807) RandomStringUtils throws confusing IAE when end <= start
Date Sun, 10 Jun 2012 12:13:43 GMT
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

        

Mime
View raw message