Skip to content

Commit 81e3d48

Browse files
committed
HDFS-17637. [BackPort] Fix spotbugs in HttpFSFileSystem#getXAttr (#7099) Contributed by Hualong Zhang.
Reviewed-by: Shilun Fan <slfan1989@apache.org> Signed-off-by: Shilun Fan <slfan1989@apache.org>
1 parent e3cba68 commit 81e3d48

File tree

1 file changed

+1
-1
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client

1 file changed

+1
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ public byte[] getXAttr(Path f, String name) throws IOException {
13701370
JSONObject json = (JSONObject) HttpFSUtils.jsonParse(conn);
13711371
Map<String, byte[]> xAttrs = createXAttrMap(
13721372
(JSONArray) json.get(XATTRS_JSON));
1373-
return xAttrs != null ? xAttrs.get(name) : null;
1373+
return xAttrs.get(name);
13741374
}
13751375

13761376
/** Convert xAttrs json to xAttrs map */

0 commit comments

Comments
 (0)