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
|
HADOOP-8818. Use equals instead == in MD5MD5CRC32FileChecksum
|
||||||
and TFileDumper. (Brandon Li via suresh)
|
and TFileDumper. (Brandon Li via suresh)
|
||||||
|
|
||||||
|
HADOOP-8821. Fix findbugs warning related to concatenating string in a
|
||||||
|
for loop in Configuration#dumpDeprecatedKeys(). (suresh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-7761. Improve the performance of raw comparisons. (todd)
|
HADOOP-7761. Improve the performance of raw comparisons. (todd)
|
||||||
|
|
|
@ -2332,17 +2332,17 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A unique class which is used as a sentinel value in the caching
|
* 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 {}
|
private static abstract class NegativeCacheSentinel {}
|
||||||
|
|
||||||
public static void dumpDeprecatedKeys() {
|
public static void dumpDeprecatedKeys() {
|
||||||
for (Map.Entry<String, DeprecatedKeyInfo> entry : deprecatedKeyMap.entrySet()) {
|
for (Map.Entry<String, DeprecatedKeyInfo> entry : deprecatedKeyMap.entrySet()) {
|
||||||
String newKeys = "";
|
StringBuilder newKeys = new StringBuilder();
|
||||||
for (String newKey : entry.getValue().newKeys) {
|
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