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


##########
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:
   If the length is 1, then it can't be empty, or am I missing something?



##########
src/test/java/org/apache/commons/lang3/StringUtilsTest.java:
##########
@@ -937,7 +937,7 @@ public void testIsAllUpperCase() {
         assertFalse(StringUtils.isAllUpperCase("A1C"));
         assertFalse(StringUtils.isAllUpperCase("A/C"));
     }
-
+    

Review Comment:
   Run `mvn` by itself to catch all build errors.



##########
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));

Review Comment:
   Why is this comment needed?



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