Browse Source

HDFS-7517. Remove redundant non-null checks in FSNamesystem#getBlockLocations. Contributed by Haohui Mai.

Haohui Mai 10 years ago
parent
commit
46612c7a51

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -579,6 +579,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7497. Inconsistent report of decommissioning DataNodes between
     dfsadmin and NameNode webui. (Yongjun Zhang via wang)
 
+    HDFS-7517. Remove redundant non-null checks in FSNamesystem#
+    getBlockLocations. (wheat9)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 0 - 4
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

@@ -1782,10 +1782,6 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
 
     logAuditEvent(true, "open", src);
 
-    if (res == null) {
-      return null;
-    }
-
     if (res.updateAccessTime()) {
       writeLock();
       final long now = now();