HDFS-17461. Fix spotbugs in PeerCache#getInternal (#6721). Contributed by Haiyang Hu.
Reviewed-by: ZanderXu <zanderxu@apache.org> Reviewed-by: Ayush Saxena <ayushsaxena@apache.org> Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
parent
d194ad0242
commit
6ccb223c9c
@ -155,10 +155,6 @@ public Peer get(DatanodeID dnId, boolean isDomain) {
|
||||
|
||||
private synchronized Peer getInternal(DatanodeID dnId, boolean isDomain) {
|
||||
List<Value> sockStreamList = multimap.get(new Key(dnId, isDomain));
|
||||
if (sockStreamList == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Iterator<Value> iter = sockStreamList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
Value candidate = iter.next();
|
||||
|
Loading…
Reference in New Issue
Block a user