HBASE-18268 Eliminate the findbugs warnings for hbase-client

This commit is contained in:
Chia-Ping Tsai 2017-06-27 10:17:41 +08:00
parent d215cb4950
commit cc4301ca08
4 changed files with 6 additions and 4 deletions

View File

@ -1091,12 +1091,13 @@ public class ColumnFamilyDescriptorBuilder {
s.append(HConstants.METADATA).append(" => ");
s.append('{');
boolean printComma = false;
for (Bytes k : values.keySet()) {
for (Map.Entry<Bytes, Bytes> entry : values.entrySet()) {
Bytes k = entry.getKey();
if (RESERVED_KEYWORDS.contains(k)) {
continue;
}
String key = Bytes.toString(k.get());
String value = Bytes.toStringBinary(values.get(k).get());
String value = Bytes.toStringBinary(entry.getValue().get());
if (printComma) {
s.append(", ");
}

View File

@ -101,6 +101,8 @@ public abstract class AbstractRpcClient<T extends RpcConnection> implements RpcC
private static final ScheduledExecutorService IDLE_CONN_SWEEPER = Executors
.newScheduledThreadPool(1, Threads.newDaemonThreadFactory("Idle-Rpc-Conn-Sweeper"));
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="MS_MUTABLE_COLLECTION_PKGPROTECT",
justification="the rest of the system which live in the different package can use")
protected final static Map<Kind, TokenSelector<? extends TokenIdentifier>> TOKEN_HANDLERS = new HashMap<>();
static {

View File

@ -3211,7 +3211,6 @@ public final class ProtobufUtil {
for (ServerName serverName : status.getServers()) {
LiveServerInfo.Builder lsi =
LiveServerInfo.newBuilder().setServer(ProtobufUtil.toServerName(serverName));
status.getLoad(serverName);
lsi.setServerLoad(status.getLoad(serverName).obtainServerLoadPB());
builder.addLiveServers(lsi.build());
}

View File

@ -210,7 +210,7 @@ public class PoolMap<K, V> implements Map<K, V> {
}
}
}
return null;
return entries;
}
protected interface Pool<R> {