Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E4C4D200CCF for ; Sun, 9 Jul 2017 10:21:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E373416B95F; Sun, 9 Jul 2017 08:21:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3383D16B960 for ; Sun, 9 Jul 2017 10:21:09 +0200 (CEST) Received: (qmail 93320 invoked by uid 500); 9 Jul 2017 08:21:08 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 93311 invoked by uid 99); 9 Jul 2017 08:21:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jul 2017 08:21:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CC6FDE383A; Sun, 9 Jul 2017 08:21:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pascalschumacher@apache.org To: commits@commons.apache.org Message-Id: <4a11a19d89a04e30a306dfd421f31bd9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [text] TEXT-93: RandomStringGenerator accepts a list of valid characters Date: Sun, 9 Jul 2017 08:21:07 +0000 (UTC) archived-at: Sun, 09 Jul 2017 08:21:10 -0000 Repository: commons-text Updated Branches: refs/heads/master 9e48de8c8 -> e8ded07ba TEXT-93: RandomStringGenerator accepts a list of valid characters add since javadoc tag and other minimal clean-ups Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/e8ded07b Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/e8ded07b Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/e8ded07b Branch: refs/heads/master Commit: e8ded07ba5b747aee53ada88a8ca70773881ceb5 Parents: 9e48de8 Author: Pascal Schumacher Authored: Sun Jul 9 10:20:59 2017 +0200 Committer: Pascal Schumacher Committed: Sun Jul 9 10:20:59 2017 +0200 ---------------------------------------------------------------------- .../java/org/apache/commons/text/RandomStringGenerator.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-text/blob/e8ded07b/src/main/java/org/apache/commons/text/RandomStringGenerator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/text/RandomStringGenerator.java b/src/main/java/org/apache/commons/text/RandomStringGenerator.java index 0dcf2a1..b3a763a 100644 --- a/src/main/java/org/apache/commons/text/RandomStringGenerator.java +++ b/src/main/java/org/apache/commons/text/RandomStringGenerator.java @@ -78,7 +78,7 @@ public final class RandomStringGenerator { private final TextRandomProvider random; /** - * The source of provided charachters. + * The source of provided characters. */ private final List characterList; @@ -122,8 +122,6 @@ public final class RandomStringGenerator { return ThreadLocalRandom.current().nextInt(minInclusive, maxInclusive + 1); } - - /** * Generates a random number within a range, using a {@link ThreadLocalRandom} instance * or the user-supplied source of randomness. @@ -289,7 +287,7 @@ public final class RandomStringGenerator { private TextRandomProvider random; /** - * The source of provided charachters. + * The source of provided characters. */ private List characterList; @@ -410,6 +408,7 @@ public final class RandomStringGenerator { * @param chars set of preefined Characters for random string generation * the Character can be, may be {@code null} or empty * @return {@code this}, to allow method chaining + * @since 1.2 */ public Builder selectFrom(char ... chars) { characterList = new ArrayList();