Skip to content

Commit 173de8b

Browse files
committed
Fix a bug in random-string-alpha/0
Formerly the 0-arity case wasn't lowercasing. Also update random-string to use alphabetic-string for it's 0-arity case to keep it inline with the 1-arity case. Signed-off-by: Josh Partlow <jpartlow@glatisant.org>
1 parent 24d9345 commit 173de8b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/puppetlabs/puppetdb/random.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757

5858
(defn random-string
5959
"Generate a random string of optional length"
60-
([] (.nextAlphabetic (RandomStringUtils/secure) (inc (rand-int 10))))
60+
([] (alphabetic-string (inc (rand-int 10))))
6161
([length]
6262
(alphabetic-string length)))
6363

6464
(defn random-string-alpha
6565
"Generate a random string of optional length, only lower case alphabet chars"
66-
([] (random-string (inc (rand-int 10))))
66+
([] (random-string-alpha (inc (rand-int 10))))
6767
([length]
6868
(.toLowerCase (alphabetic-string length))))
6969

0 commit comments

Comments
 (0)