[
https://issues.apache.org/jira/browse/LANG-1793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhongxin Yan updated LANG-1793:
-------------------------------
Description:
The Javadoc of the {{isAsciiAlphanumeric}} method in {{CharUtils}} contains an
incorrect description.
The first sentence currently states:
{quote}“Tests whether the character is ASCII 7 bit numeric.”
{quote}
However, the actual implementation checks whether the character is
{*}alphanumeric{*}, meaning it returns {{true}} for both:
* alphabetic characters ({{{}A–Z{}}}, {{{}a–z{}}}), and
* numeric characters ({{{}0–9{}}}).
This mismatch between the Javadoc and the method behavior is misleading and may
cause confusion for API users. The documentation should be updated to reflect
that the method checks for ASCII alphanumeric characters, not numeric
characters only.
https://github.com/apache/commons-lang/pull/1501
!image-2025-11-25-23-58-04-347.png|width=472,height=347!
was:
The Javadoc of the {{isAsciiAlphanumeric}} method in {{CharUtils}} contains an
incorrect description.
The first sentence currently states:
{quote}“Tests whether the character is ASCII 7 bit numeric.”
{quote}
However, the actual implementation checks whether the character is
{*}alphanumeric{*}, meaning it returns {{true}} for both:
* alphabetic characters ({{{}A–Z{}}}, {{{}a–z{}}}), and
* numeric characters ({{{}0–9{}}}).
This mismatch between the Javadoc and the method behavior is misleading and may
cause confusion for API users. The documentation should be updated to reflect
that the method checks for ASCII alphanumeric characters, not numeric
characters only.
!image-2025-11-25-23-58-04-347.png|width=472,height=347!
> Incorrect Javadoc description in CharUtils.isAsciiAlphanumeric()
> ----------------------------------------------------------------
>
> Key: LANG-1793
> URL: https://issues.apache.org/jira/browse/LANG-1793
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.20.0
> Reporter: Zhongxin Yan
> Priority: Major
> Attachments: image-2025-11-25-23-58-04-347.png
>
>
> The Javadoc of the {{isAsciiAlphanumeric}} method in {{CharUtils}} contains
> an incorrect description.
> The first sentence currently states:
> {quote}“Tests whether the character is ASCII 7 bit numeric.”
> {quote}
> However, the actual implementation checks whether the character is
> {*}alphanumeric{*}, meaning it returns {{true}} for both:
> * alphabetic characters ({{{}A–Z{}}}, {{{}a–z{}}}), and
> * numeric characters ({{{}0–9{}}}).
> This mismatch between the Javadoc and the method behavior is misleading and
> may cause confusion for API users. The documentation should be updated to
> reflect that the method checks for ASCII alphanumeric characters, not numeric
> characters only.
> https://github.com/apache/commons-lang/pull/1501
> !image-2025-11-25-23-58-04-347.png|width=472,height=347!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)