[LANG-754] Fix ClassUtils.getShortName to only do a reverse lookup for array types.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1470174 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-04-20 15:18:08 +00:00
parent bb95f8a194
commit d49d8093e2
2 changed files with 4 additions and 3 deletions

View File

@ -22,6 +22,7 @@
<body> <body>
<release version="3.2" date="TBA" description="Next release"> <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-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-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> <action issue="LANG-797" type="add">Added escape/unescapeJson to StringEscapeUtils</action>

View File

@ -200,11 +200,11 @@ public static String getShortClassName(String className) {
if (className.charAt(0) == 'L' && className.charAt(className.length() - 1) == ';') { if (className.charAt(0) == 'L' && className.charAt(className.length() - 1) == ';') {
className = className.substring(1, className.length() - 1); className = className.substring(1, className.length() - 1);
} }
}
if (reverseAbbreviationMap.containsKey(className)) { if (reverseAbbreviationMap.containsKey(className)) {
className = reverseAbbreviationMap.get(className); className = reverseAbbreviationMap.get(className);
} }
}
final int lastDotIdx = className.lastIndexOf(PACKAGE_SEPARATOR_CHAR); final int lastDotIdx = className.lastIndexOf(PACKAGE_SEPARATOR_CHAR);
final int innerIdx = className.indexOf( final int innerIdx = className.indexOf(