smengcl commented on code in PR #10710:
URL: https://github.com/apache/ozone/pull/10710#discussion_r3557378404
##########
hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/FSOperations.java:
##########
@@ -395,24 +393,22 @@ private static JSONObject
storagePolicyToJSON(BlockStoragePolicySpi policy) {
return policyJson;
}
- @SuppressWarnings("unchecked")
- private static JSONArray toJsonArray(StorageType[] storageTypes) {
- JSONArray jsonArray = new JSONArray();
+ private static List<Object> toJsonArray(StorageType[] storageTypes) {
+ List<Object> jsonArray = new ArrayList<>();
Review Comment:
Fixed in 79c4f871171. toJsonArray now returns List<String>.
##########
hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/FSOperations.java:
##########
@@ -107,7 +106,7 @@ private static Map<String, Object> toJson(FileStatus[]
fileStatuses,
boolean isFile) {
Map<String, Object> json = new LinkedHashMap<>();
Map<String, Object> inner = new LinkedHashMap<>();
- JSONArray statuses = new JSONArray();
+ List<Object> statuses = new ArrayList<>();
Review Comment:
Fixed in 79c4f871171. statuses is now List<Map<String, Object>>. Also
narrowed the two other analogous array locals introduced by this migration (ACL
entries to List<String>, storage policies to List<Map<String, Object>>).
--
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]