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:
parent
0c53ed4cd1
commit
5d37911882
@ -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)
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user