Bug 61358

Summary: Replace deprecated RandomStringUtils by commons-text RandomStringGenerator
Product: JMeter - Now in Github Reporter: Philippe Mouawad <p.mouawad>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: enhancement CC: p.mouawad, ra0077
Priority: P2    
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Philippe Mouawad 2017-07-29 14:17:54 UTC
RandomStringUtils is deprecated since commons-lang3-3.6
Comment 1 Philippe Mouawad 2017-09-02 21:29:38 UTC
Hello,

Not sure it's a good idea for now.
My understanding is that it may incur additional objects creation for builders particularly for RandomString from a set of chars.

Recoded as of commons-text-1.1, it would be something like:
final String lcharsToUse = charsToUse;
myValue = new RandomStringGenerator.Builder()
                    .filteredBy(c -> lcharsToUse.indexOf(c) >= 0)
                    .build().generate(length);

Version 1.2 has a selectFrom() 

But anyway, AFAIU this consumes more objects than RandomStringUtils.

Am I wrong ?
Comment 2 Philippe Mouawad 2017-09-03 15:22:50 UTC
Maybe wait for next versions of commons-text:

- http://markmail.org/message/azxw4nai7fs2laas
Comment 3 The ASF infrastructure team 2022-09-24 20:38:09 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4453