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


##########
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:
   You're right — since className.length() == 1, the string can’t be empty.
   I'm planning to remove the !className.isEmpty() check and keep just 
className.length() == 1 — does that sound good?



-- 
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