HDFS-17637. 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>
This commit is contained in:
parent
5ea3a1bd0a
commit
1f0d9df887
@ -1370,7 +1370,7 @@ public byte[] getXAttr(Path f, String name) throws IOException {
|
||||
JSONObject json = (JSONObject) HttpFSUtils.jsonParse(conn);
|
||||
Map<String, byte[]> xAttrs = createXAttrMap(
|
||||
(JSONArray) json.get(XATTRS_JSON));
|
||||
return xAttrs != null ? xAttrs.get(name) : null;
|
||||
return xAttrs.get(name);
|
||||
}
|
||||
|
||||
/** Convert xAttrs json to xAttrs map */
|
||||
|
Loading…
Reference in New Issue
Block a user