You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Pascal Schumacher <pa...@gmx.net> on 2017/07/13 20:02:55 UTC

[lang] - Remove RandomStringUtils deprecation / move it to [text]?

Hello everybody,

with 3.5 we deprecated RandomStringUtils in favor of 
RandomStringGenerator in commons-text.

https://issues.apache.org/jira/browse/TEXT-96 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


Re: [lang] - Remove RandomStringUtils deprecation / move it to [text]?

Posted by Amey Jadiye <am...@gmail.com>.
Thanks, I will raise PR soon, and for this we don't have to wait for 2.x ,
that's good part.

Regards,
Amey

On Sun, Jul 16, 2017, 3:41 PM Pascal Schumacher <pa...@gmx.net>
wrote:

> Hello Amey,
>
> that seems to be the cleanest solution (although the one requiring the
> most work).
>
> Cheers,
> Pascal
>
> Am 14.07.2017 um 18:59 schrieb Amey Jadiye:
> > 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.
> >
> > Regards,
> > Amey
> >
> >
> > On Fri, Jul 14, 2017 at 1:32 AM, Pascal Schumacher <
> pascalschumacher@gmx.net>
> > wrote:
> >> Hello everybody,
> >>
> >> with 3.5 we deprecated RandomStringUtils in favor of
> > RandomStringGenerator in commons-text.
> >> https://issues.apache.org/jira/browse/TEXT-96 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: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [lang] - Remove RandomStringUtils deprecation / move it to [text]?

Posted by Pascal Schumacher <pa...@gmx.net>.
Hello Amey,

that seems to be the cleanest solution (although the one requiring the 
most work).

Cheers,
Pascal

Am 14.07.2017 um 18:59 schrieb Amey Jadiye:
> 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.
>
> Regards,
> Amey
>
>
> On Fri, Jul 14, 2017 at 1:32 AM, Pascal Schumacher <pa...@gmx.net>
> wrote:
>> Hello everybody,
>>
>> with 3.5 we deprecated RandomStringUtils in favor of
> RandomStringGenerator in commons-text.
>> https://issues.apache.org/jira/browse/TEXT-96 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: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [lang] - Remove RandomStringUtils deprecation / move it to [text]?

Posted by Amey Jadiye <am...@gmail.com>.
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.

Regards,
Amey


On Fri, Jul 14, 2017 at 1:32 AM, Pascal Schumacher <pa...@gmx.net>
wrote:
>
> Hello everybody,
>
> with 3.5 we deprecated RandomStringUtils in favor of
RandomStringGenerator in commons-text.
>
> https://issues.apache.org/jira/browse/TEXT-96 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: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org

Re: [lang] - Remove RandomStringUtils deprecation / move it to [text]?

Posted by Pascal Schumacher <pa...@gmx.net>.
Am 13.07.2017 um 22:06 schrieb Gary Gregory:
> Can one be pitch for entry level and the other for advanced use cases?
imho yes
>
> If so, just un-deprecate but still Javadoc to [text] the user's edification.
sounds good


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [lang] - Remove RandomStringUtils deprecation / move it to [text]?

Posted by Gary Gregory <ga...@gmail.com>.
Can one be pitch for entry level and the other for advanced use cases?

If so, just un-deprecate but still Javadoc to [text] the user's edification.

Gary

On Thu, Jul 13, 2017 at 1:02 PM, Pascal Schumacher <pascalschumacher@gmx.net
> wrote:

> Hello everybody,
>
> with 3.5 we deprecated RandomStringUtils in favor of RandomStringGenerator
> in commons-text.
>
> https://issues.apache.org/jira/browse/TEXT-96 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
>
>