commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amey Jadiye <>
Subject Re: [lang] - Remove RandomStringUtils deprecation / move it to [text]?
Date Fri, 14 Jul 2017 16:59:51 GMT
Hello Pascal,

Thanks for putting this on table, I too think that users need some short
code to show up output really quick.

How about this plan :-

1. Keep RandomStringUtils deprecated in commons-lang.
2. Move RandomStringUtils class to commons-text.
3. Remove all existing code from methods of RandomStringUtils and call our
brand new RandomStringGenerator in them. to return respective values i.e.
randomNumeric, randomAlphabetic, randomAlphanumeric etc....

Its obvious question "what we will achieve with this ?"

So, we are still promoting the RandomStringGenerator this should be the
base of all random string generator methods.
since RandomStringGenerator very flexible we can keep the functionalities
from RandomStringUtils untouched and can retain users who are still
addicted to same class and API of RandomStringUtils, else users will not
accept new and bit cumbersome (with their perspective)
RandomStringGenerator and stick to old code.

The user who want bit more flexibility are still welcome to use
RandomStringGenerator anyway.


On Fri, Jul 14, 2017 at 1:32 AM, Pascal Schumacher <>
> Hello everybody,
> with 3.5 we deprecated RandomStringUtils in favor of
RandomStringGenerator in commons-text.
> complains that
"RandomStringGenerator is extremely verbose compared to the deprecated
commons.lang3 RandomStringUtils."
> From my experience taking a look at migrating a project from
RandomStringUtils to RandomStringGenerator I have to agree. Some
convenience methods will be added with the next commons text release, but
it still won't be as easy to use as RandomStringUtils. For course
RandomStringGenerator gives the user more options, but most usage of
RandomStringUtils I have seen was just for tests or other simple use-cases
where these option are not required.
> Maybe we should just remove the RandomStringUtils deprecation or add the
whole class untouched to commons-text?
> What do you think?
> Cheers,
> Pascal

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message