HADOOP-8821. Fix findbugs warning related concatenating string in a for loop in Configuration#dumpDeprecatedKeys(). Contributed by Suresh Srinivas.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1385389 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2012-09-16 22:33:13 +00:00
parent 0c53ed4cd1
commit 5d37911882
2 changed files with 7 additions and 4 deletions

View File

@ -211,6 +211,9 @@ Trunk (Unreleased)
HADOOP-8818. Use equals instead == in MD5MD5CRC32FileChecksum
and TFileDumper. (Brandon Li via suresh)
HADOOP-8821. Fix findbugs warning related to concatenating string in a
for loop in Configuration#dumpDeprecatedKeys(). (suresh)
OPTIMIZATIONS
HADOOP-7761. Improve the performance of raw comparisons. (todd)

View File

@ -2332,17 +2332,17 @@ private static void addDeprecatedKeys() {
/**
* A unique class which is used as a sentinel value in the caching
* for getClassByName. {@see Configuration#getClassByNameOrNull(String)}
* for getClassByName. {@link Configuration#getClassByNameOrNull(String)}
*/
private static abstract class NegativeCacheSentinel {}
public static void dumpDeprecatedKeys() {
for (Map.Entry<String, DeprecatedKeyInfo> entry : deprecatedKeyMap.entrySet()) {
String newKeys = "";
StringBuilder newKeys = new StringBuilder();
for (String newKey : entry.getValue().newKeys) {
newKeys += newKey + "\t";
newKeys.append(newKey).append("\t");
}
System.out.println(entry.getKey() + "\t" + newKeys);
System.out.println(entry.getKey() + "\t" + newKeys.toString());
}
}
}