[
https://issues.apache.org/jira/browse/LANG-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved LANG-1803.
-----------------------------------
Fix Version/s: 3.20.1
Resolution: Fixed
[~zhongxin]
Thank you for your report.
I reviewed and merged the PR. Please verify and close this ticket if
appropriate.
> Fix incorrect method invocation and javadoc reference in ObjectUtilsTest and
> RandomStringUtils
> ----------------------------------------------------------------------------------------------
>
> Key: LANG-1803
> URL: https://issues.apache.org/jira/browse/LANG-1803
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.20.0
> Reporter: Zhongxin Yan
> Priority: Major
> Fix For: 3.20.1
>
> Attachments: image-2025-12-16-23-17-20-492.png,
> image-2025-12-16-23-25-09-778.png, image-2025-12-16-23-25-36-658.png
>
>
> Two incorrect references need to be fixed in the codebase: [github
> PR|https://github.com/apache/commons-lang/pull/1528]
> h4. 1. Wrong method call in ObjectUtilsTest#testConstMethods
> In the test method {{{}ObjectUtilsTest#testConstMethods{}}}, the assertion
> for validating IllegalArgumentException is incorrectly invoking
> {{ObjectUtils.CONST_BYTE(32768)}} instead of
> {{{}ObjectUtils.CONST_SHORT(32768){}}}.
> The current code snippet:
> !image-2025-12-16-23-17-20-492.png!
> The test comment explicitly refers to {{{}CONST_SHORT(32768){}}}, and the
> value 32768 exceeds the range of the {{short}} type (which is -32768 to
> 32767) — this confirms the intended method call is {{{}CONST_SHORT{}}}, not
> {{{}CONST_BYTE{}}}.
>
> h4. 2. Incorrect javadoc reference in RandomStringUtils#randomPrint
> The javadoc of the deprecated methods contain an incorrect link to
> {{{{}}{@link #randomPrint{}}}{{{{}}{}}} #
> \{{RandomStringUtils#randomPrint(final int count) }}
> # {{RandomStringUtils#randomPrint(final int minLengthInclusive, final int
> maxLengthExclusive)}}
> The current javadoc line:
> !image-2025-12-16-23-25-09-778.png|width=479,height=135!
> !image-2025-12-16-23-25-36-658.png|width=481,height=132!
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)