commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilson MacGyver <>
Subject [text] RandomStringGenerator as replacement for RandomStringUtils
Date Tue, 20 Jun 2017 04:12:58 GMT

After upgrading to commons-lang 3.6 I noticed RandomStringUtils has been
deprecated in favor of RandomStringGenerator in commons-text

currently I'm using it by passing a character array that has a mix of
characters and symbols. I'm also using SecureRandom as the random source

I'm not at all clear on how to do this in RandomStringGenerator.

I notice in the builder you can pass a range, but this implies characters
you want to use must be continuous within unicode. The only thing I can
think of is to then
use filteredBy to filter out characters that I don't want?

At first glance, it also looks like usingRandom() only works with the
apache common RNG?


Omnem crede diem tibi diluxisse supremum.

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