You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Zhongxin Yan (Jira)" <ji...@apache.org> on 2025/11/29 12:37:00 UTC
[jira] [Updated] (LANG-1796) Typo in StringUtils.abbreviateMiddle method variable name (targetSting)
[ https://issues.apache.org/jira/browse/LANG-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhongxin Yan updated LANG-1796:
-------------------------------
Description:
In the {{StringUtils.abbreviateMiddle}} method, there is a minor typo in a variable name:
{code:java}
final int targetSting = length - middle.length();{code}
The variable name targetSting should be targetString to accurately reflect its purpose.
*Proposed fix:*
Rename the variable from {{targetSting}} to {{targetString}} throughout the method. [~ggregory] [PR|https://github.com/apache/commons-lang/pull/1507]
!image-2025-11-29-20-16-50-724.png|width=569,height=145!
was:
In the {{StringUtils.abbreviateMiddle}} method, there is a minor typo in a variable name:
{code:java}
final int targetSting = length - middle.length();{code}
The variable name targetSting should be targetString to accurately reflect its purpose.
*Proposed fix:*
Rename the variable from {{targetSting}} to {{targetString}} throughout the method.
!image-2025-11-29-20-16-50-724.png|width=569,height=145!
> Typo in StringUtils.abbreviateMiddle method variable name (targetSting)
> -----------------------------------------------------------------------
>
> Key: LANG-1796
> URL: https://issues.apache.org/jira/browse/LANG-1796
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.20.0
> Reporter: Zhongxin Yan
> Priority: Major
> Attachments: image-2025-11-29-20-16-50-724.png
>
>
> In the {{StringUtils.abbreviateMiddle}} method, there is a minor typo in a variable name:
> {code:java}
> final int targetSting = length - middle.length();{code}
> The variable name targetSting should be targetString to accurately reflect its purpose.
> *Proposed fix:*
> Rename the variable from {{targetSting}} to {{targetString}} throughout the method. [~ggregory] [PR|https://github.com/apache/commons-lang/pull/1507]
> !image-2025-11-29-20-16-50-724.png|width=569,height=145!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)