abhisripathi opened a new pull request, #1391:
URL: https://github.com/apache/commons-lang/pull/1391

   This PR fixes issue LANG-1771 where the input "[String" was incorrectly 
interpreted as "short[]" by the getShortCanonicalName method in ClassUtils.
   
   ✅ Root Cause:
   The internal descriptor parser treated the first character 'S' from "String" 
as a JVM type abbreviation for short.
   
   ✅ Fix:
   - Added validation to only apply abbreviation map to single-character 
descriptors.
   - Malformed inputs like "[String" now return "String[]" as expected.
   
   ✅ Tests:
   - Added test_getShortCanonicalName_MalformedInput to ClassUtilsTest
   - Confirmed it fails before the fix and passes after
   - All other tests pass (67/67)
   
   Closes: https://issues.apache.org/jira/browse/LANG-1771


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to