commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From britter <...@git.apache.org>
Subject [GitHub] commons-lang pull request #186: LANG-1252: rename isNumber, isCreatable. Acc...
Date Sun, 11 Sep 2016 16:33:57 GMT
Github user britter commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/186#discussion_r78298119
  
    --- Diff: src/main/java/org/apache/commons/lang3/math/NumberUtils.java ---
    @@ -1360,11 +1361,44 @@ public static boolean isDigits(final String str) {
          * <p><code>null</code> and empty/blank {@code String} will return
          * <code>false</code>.</p>
          *
    +     * <p>Note, {@link #createNumber(String)} should return a number for every
    +     * input resuling in <code>true</code>.</p>
    +     *
          * @param str  the <code>String</code> to check
          * @return <code>true</code> if the string is a correctly formatted number
    -     * @since 3.3 the code supports hex {@code 0Xhhh} and octal {@code 0ddd} validation
    +     * @since 3.3 the code supports hex {@code 0Xhhh} an
    +     *        octal {@code 0ddd} validation
    +     * @deprecated This feature will be removed in Lang 4.0,
    +     *             use {@link NumberUtils#isCreatable(String)} instead
          */
    +    @Deprecated
         public static boolean isNumber(final String str) {
    +        return isCreatable(str);
    +    }
    +
    +    /**
    +     * <p>Checks whether the String a valid Java number.</p>
    +     *
    +     * <p>Valid numbers include hexadecimal marked with the <code>0x</code>
or
    +     * <code>0X</code> qualifier, octal numbers, scientific notation and
    +     * numbers marked with a type qualifier (e.g. 123L).</p>
    +     *
    +     * <p>Non-hexadecimal strings beginning with a leading zero are
    +     * treated as octal values. Thus the string <code>09</code> will return
    +     * <code>false</code>, since <code>9</code> is not a valid
octal value.
    +     * However, numbers beginning with {@code 0.} are treated as decimal.</p>
    +     *
    +     * <p><code>null</code> and empty/blank {@code String} will return
    +     * <code>false</code>.</p>
    +     *
    +     * <p>Note, {@link #createNumber(String)} should return a number for every
    +     * input resuling in <code>true</code>.</p>
    +     *
    +     * @param str  the <code>String</code> to check
    +     * @return <code>true</code> if the string is a correctly formatted number
    +     * @since 3.3 the code supports hex {@code 0Xhhh} and octal {@code 0ddd} validation
    --- End diff --
    
    should be changed to simply `@since 3.5`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message