You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/09/07 02:43:48 UTC
svn commit: r1381827 -
/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
Author: sebb
Date: Fri Sep 7 00:43:48 2012
New Revision: 1381827
URL: http://svn.apache.org/viewvc?rev=1381827&view=rev
Log:
Update Javadoc
Modified:
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=1381827&r1=1381826&r2=1381827&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java Fri Sep 7 00:43:48 2012
@@ -5226,6 +5226,11 @@ public class StringUtils {
* <p>{@code null} will return {@code false}.
* An empty CharSequence (length()=0) will return {@code false}.</p>
*
+ * <p>Note that the method does not allow for a leading sign, either positive or negative.
+ * Also, if a String passes the numeric test, it may still generate a NumberFormatException
+ * when parsed by Integer.parseInt or Long.parseLong, e.g. if the value is outside the range
+ * for int or long respectively.</p>
+ *
* <pre>
* StringUtils.isNumeric(null) = false
* StringUtils.isNumeric("") = false
@@ -5235,6 +5240,8 @@ public class StringUtils {
* StringUtils.isNumeric("ab2c") = false
* StringUtils.isNumeric("12-3") = false
* StringUtils.isNumeric("12.3") = false
+ * StringUtils.isNumeric("-123") = false
+ * StringUtils.isNumeric("+123") = false
* </pre>
*
* @param cs the CharSequence to check, may be null