abhisripathi commented on code in PR #1391:
URL: https://github.com/apache/commons-lang/pull/1391#discussion_r2110595399


##########
src/main/java/org/apache/commons/lang3/ClassUtils.java:
##########
@@ -496,9 +496,14 @@ private static String getCanonicalName(final String name) {
         className = className.substring(dim);
         if (className.startsWith("L")) {
             className = className.substring(1, className.endsWith(";") ? 
className.length() - 1 : className.length());
-        } else if (!className.isEmpty()) {
-            className = reverseAbbreviationMap.get(className.substring(0, 1));
+        } 
+//        else if (!className.isEmpty()) {
+//            className = reverseAbbreviationMap.get(className.substring(0, 
1));
+//        }
+        else if (!className.isEmpty() && className.length() == 1 && 
reverseAbbreviationMap.containsKey(className)) {

Review Comment:
   I reviewed the test suite and found that most formats (primitive, object 
arrays, inner classes, null) are already covered. I’ve added tests specifically 
for the malformed descriptors [String and [LString which are directly related 
to this fix.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to