diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java index dab4776575..df78938c20 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java @@ -1370,7 +1370,7 @@ public byte[] getXAttr(Path f, String name) throws IOException { JSONObject json = (JSONObject) HttpFSUtils.jsonParse(conn); Map xAttrs = createXAttrMap( (JSONArray) json.get(XATTRS_JSON)); - return xAttrs != null ? xAttrs.get(name) : null; + return xAttrs.get(name); } /** Convert xAttrs json to xAttrs map */