commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Schneegans (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LANG-1017) Use non-ASCII digits in Javadoc examples for StringUtils.isNumeric
Date Sun, 25 May 2014 19:01:01 GMT

     [ https://issues.apache.org/jira/browse/LANG-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christoph Schneegans updated LANG-1017:
---------------------------------------

    Description: 
The Javadoc comment for the method org.apache.commons.lang3.StringUtils.isNumeric(CharSequence)
contains a single "true" case, namely

  \* StringUtils.isNumeric("123")  = true

Hence, one might wrongly assume that this method is suitable to check whether a string consists
only of ASCII digits (U+0030..U+0039).

Consider providing another "true" case, e.g. using Devanagari digits:

  \* StringUtils.isNumeric("१२३")  = true
  \* StringUtils.isNumeric("&\#x967;&\#x968;&\#x969;") = true

  was:
The Javadoc comment for the method org.apache.commons.lang3.StringUtils.isNumeric(CharSequence)
contains a single "true" case, namely

  * StringUtils.isNumeric("123")  = true

Hence, one might wrongly assume that this method is suitable to check whether a string consists
only of ASCII digits (U+0030..U+0039).

Consider providing another "true" case, e.g. using Devanagari digits:

  * StringUtils.isNumeric("१२३")  = true
  * StringUtils.isNumeric("&\#x967;&\#x968;&\#x969;") = true


> Use non-ASCII digits in Javadoc examples for StringUtils.isNumeric
> ------------------------------------------------------------------
>
>                 Key: LANG-1017
>                 URL: https://issues.apache.org/jira/browse/LANG-1017
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>    Affects Versions: 3.3.2
>            Reporter: Christoph Schneegans
>            Priority: Trivial
>
> The Javadoc comment for the method org.apache.commons.lang3.StringUtils.isNumeric(CharSequence)
contains a single "true" case, namely
>   \* StringUtils.isNumeric("123")  = true
> Hence, one might wrongly assume that this method is suitable to check whether a string
consists only of ASCII digits (U+0030..U+0039).
> Consider providing another "true" case, e.g. using Devanagari digits:
>   \* StringUtils.isNumeric("१२३")  = true
>   \* StringUtils.isNumeric("&\#x967;&\#x968;&\#x969;") = true



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message