Am 27.12.2016 um 11:51 schrieb Duncan Jones:
On 27 Dec 2016, at 10:29, Gilles <gil...@harfang.homelinux.org> wrote:
Hi.
On Tue, 27 Dec 2016 09:54:29 +0000 (UTC), djo...@apache.org wrote:
A string of length zero hardly qualifies as random.
Shouldn't "generate(0)" rather raise an exception?
[I know that "nextInt(1)" is also not random, but what applies to a
general-purpose low-level utility might not be the best option for
applications that would use TEXT.]
I was following the Robustness principle. Asking for a zero-length string is
odd, but as there was a way to interpret that request without throwing an
exception, I did so.
+1 When generating strings with a random length (e.g between 0 and 10)
asking for a zero length string is not so odd.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org