You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/04/20 17:18:08 UTC

svn commit: r1470174 - in /commons/proper/lang/trunk/src: changes/changes.xml main/java/org/apache/commons/lang3/ClassUtils.java

Author: tn
Date: Sat Apr 20 15:18:08 2013
New Revision: 1470174

URL: http://svn.apache.org/r1470174
Log:
[LANG-754] Fix ClassUtils.getShortName to only do a reverse lookup for array types.

Modified:
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java

Modified: commons/proper/lang/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/changes/changes.xml?rev=1470174&r1=1470173&r2=1470174&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/changes/changes.xml (original)
+++ commons/proper/lang/trunk/src/changes/changes.xml Sat Apr 20 15:18:08 2013
@@ -22,6 +22,7 @@
   <body>
 
   <release version="3.2" date="TBA" description="Next release">
+    <action issue="LANG-754" type="fix">ClassUtils.getShortName(String) will now only do a reverse lookup for array types</action>  
     <action issue="LANG-886" type="add">Added CharSetUtils.containsAny(String, String)</action>
     <action issue="LANG-846" type="update">Provide CharSequenceUtils.regionMatches with a proper green implementation instead of inefficiently converting to Strings</action>
     <action issue="LANG-797" type="add">Added escape/unescapeJson to StringEscapeUtils</action>

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java?rev=1470174&r1=1470173&r2=1470174&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java Sat Apr 20 15:18:08 2013
@@ -200,10 +200,10 @@ public class ClassUtils {
             if (className.charAt(0) == 'L' && className.charAt(className.length() - 1) == ';') {
                 className = className.substring(1, className.length() - 1);
             }
-        }
 
-        if (reverseAbbreviationMap.containsKey(className)) {
-            className = reverseAbbreviationMap.get(className);
+            if (reverseAbbreviationMap.containsKey(className)) {
+                className = reverseAbbreviationMap.get(className);
+            }
         }
 
         final int lastDotIdx = className.lastIndexOf(PACKAGE_SEPARATOR_CHAR);