commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Jones (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (TEXT-84) RandomStringGenerator claims to be immutable, but isn't
Date Sun, 04 Jun 2017 07:36:04 GMT

     [ https://issues.apache.org/jira/browse/TEXT-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Duncan Jones closed TEXT-84.
----------------------------
       Resolution: Fixed
         Assignee: Duncan Jones
    Fix Version/s: 1.2

Fixed in 4004cfdee.

> RandomStringGenerator claims to be immutable, but isn't
> -------------------------------------------------------
>
>                 Key: TEXT-84
>                 URL: https://issues.apache.org/jira/browse/TEXT-84
>             Project: Commons Text
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Duncan Jones
>            Assignee: Duncan Jones
>             Fix For: 1.2
>
>
> {{RandomStringGenerator}} claims to be immutable in the Javadocs, however it accepts
a {{TextRandomProvider}} object through the builder pattern. This object may altered by external
code, thus breaking the immutability claim of our generator.
> A possible solution is to adjust the documentation for {{TextRandomProvider}} and require
implementations to be immutable. Alternatively, we can relax the documentation in {{RandomStringGenerator}}
to remove the immutability claim or state that the mutability is linked to the mutability
of the random source (when provided).
> I think we will have to do the latter, since the former would forbid callers from supplying
a {{UniformRandomProvider}} instance as suggested in the documentation. Thoughts welcome.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message