Skip to content

Commit b8f482a

Browse files
haiyang1987Sadanand Shenoy
authored andcommitted
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>
1 parent 8d60333 commit b8f482a

File tree

1 file changed

+0
-4
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs

1 file changed

+0
-4
lines changed

hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/PeerCache.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ public Peer get(DatanodeID dnId, boolean isDomain) {
155155

156156
private synchronized Peer getInternal(DatanodeID dnId, boolean isDomain) {
157157
List<Value> sockStreamList = multimap.get(new Key(dnId, isDomain));
158-
if (sockStreamList == null) {
159-
return null;
160-
}
161-
162158
Iterator<Value> iter = sockStreamList.iterator();
163159
while (iter.hasNext()) {
164160
Value candidate = iter.next();

0 commit comments

Comments
 (0)