You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/10/05 13:21:44 UTC

[commons-lang] branch master updated: Improve Javadoc based on the discussion of the GitHub PR #459.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new c1fbeee  Improve Javadoc based on the discussion of the GitHub PR #459.
c1fbeee is described below

commit c1fbeee23ee0e5bfa549b8e3ed38cacc8b103753
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Oct 5 09:21:40 2019 -0400

    Improve Javadoc based on the discussion of the GitHub PR #459.
---
 .../apache/commons/lang3/RandomStringUtils.java    | 31 +++++++++++-----------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
index becc268..b741836 100644
--- a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
@@ -19,8 +19,22 @@ package org.apache.commons.lang3;
 import java.util.Random;
 
 /**
- * <p>Operations for random {@code String}s.</p>
- * <p>Currently <em>private high surrogate</em> characters are ignored.
+ * <p>Generates random {@code String}s.</p>
+ * 
+ * <p><b>Caveat: Instances of {@link Random}, upon which the implementation of this
+ * class relies, are not cryptographically secure.</b></p>
+ *
+ * <p>RandomStringUtils is intended for simple use cases. For more advanced
+ * use cases consider using Apache Commons Text's
+ * <a href="https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/RandomStringGenerator.html">
+ * RandomStringGenerator</a> instead.</p>
+ * 
+ * <p>The Apache Commons project provides
+ * <a href="https://commons.apache.org/rng">Commons RNG</a> dedicated to pseudo-random number generation, that may be
+ * a better choice for applications with more stringent requirements
+ * (performance and/or correctness).</p>
+ *
+ * <p>Note that <em>private high surrogate</em> characters are ignored.
  * These are Unicode characters that fall between the values 56192 (db80)
  * and 56319 (dbff) as we don't know how to handle them.
  * High and low surrogates are correctly dealt with - that is if a
@@ -28,19 +42,6 @@ import java.util.Random;
  * then it is followed by a low surrogate. If a low surrogate is chosen,
  * 56320 (dc00) to 57343 (dfff) then it is placed after a randomly
  * chosen high surrogate.</p>
- * <p>RandomStringUtils is intended for simple use cases. For more advanced
- * use cases consider using commons-text
- * <a href="https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/RandomStringGenerator.html">
- * RandomStringGenerator</a> instead.</p>
- *
- * <p>Caveat: Instances of {@link Random}, upon which the implementation of this
- * class relies, are not cryptographically secure.</p>
- *
- * <p>Please note that the Apache Commons project provides a component
- * dedicated to pseudo-random number generation, namely
- * <a href="https://commons.apache.org/rng">Commons RNG</a>, that may be
- * a better choice for applications with more stringent requirements
- * (performance and/or correctness).</p>
  *
  * <p>#ThreadSafe#</p>
  * @since 1.0