[ https://issues.apache.org/jira/browse/LANG-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dianshu Liao updated LANG-1771: ------------------------------- Description: In org.apache.commons.lang3.ClassUtils, the method "public static String getShortCanonicalName(final String canonicalName)" returns an incorrect result when given certain malformed array class name strings. Specifically, for the input {{{}"[String"{}}}, it incorrectly returns {{"short[]"}} instead of the expected {{{}"String[]"{}}}. was: In org.apache.commons.lang3.ClassUtils, the method "public static String getShortCanonicalName(final String canonicalName)" returns an incorrect result when given certain malformed array class name strings. Specifically, for the input {{{}"[String"{}}}, it incorrectly returns {{"short[]"}} instead of the expected {{{}"String[]"{}}}. This issue seems only occurs with input "[String". Other inputs like: "[I" → returns "int[]" (correct) "Ljava.lang.String;" → returns "java.lang.String" (correct) *Version Affected:* {{3.18.0-SNAPSHOT}} > Incorrect output from ClassUtils.getCanonicalName when input is "[String" in > version 3.18.0-SNAPSHOT > ----------------------------------------------------------------------------------------------------- > > Key: LANG-1771 > URL: https://issues.apache.org/jira/browse/LANG-1771 > Project: Commons Lang > Issue Type: Bug > Components: lang.* > Affects Versions: 3.18.0 > Environment: MacOS Sequoia Version 15.3.2 > JDK 8 > > Reporter: Dianshu Liao > Priority: Major > Attachments: Screenshot 2025-05-20 at 2.23.16 am.png > > Original Estimate: 1h > Remaining Estimate: 1h > > In org.apache.commons.lang3.ClassUtils, the method "public static String > getShortCanonicalName(final String canonicalName)" returns an incorrect > result when given certain malformed array class name strings. Specifically, > for the input {{{}"[String"{}}}, it incorrectly returns {{"short[]"}} instead > of the expected {{{}"String[]"{}}}. > -- This message was sent by Atlassian Jira (v8.20.10#820010)