Copilot commented on code in PR #10710:
URL: https://github.com/apache/ozone/pull/10710#discussion_r3557458848
##########
hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/FSOperations.java:
##########
@@ -258,7 +257,7 @@ private static Map fileChecksumToJSON(FileChecksum
checksum) {
private static Map xAttrsToJSON(Map<String, byte[]> xAttrs,
XAttrCodec encoding) throws IOException {
Map jsonMap = new LinkedHashMap();
- JSONArray jsonArray = new JSONArray();
+ List<Object> jsonArray = new ArrayList<>();
Review Comment:
In xAttrsToJSON, jsonArray is declared as List<Object> but is only populated
with Map entries. Keeping it as Object loses type-safety and forces raw Map
usage/suppressions. This can be narrowed to List<Map<String, Object>> (and the
local maps parameterized) without changing the serialized JSON.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]