mchades commented on code in PR #14374:
URL: https://github.com/apache/gravitino/pull/14374#discussion_r4421261092
##########
common/src/main/java/org/apache/gravitino/semantic/OssieDocumentConverter.java:
##########
@@ -747,7 +765,7 @@ private static void stashProperties(ObjectNode root,
Map<String, String> propert
private static Map<String, String> extractProperties(ObjectNode root) {
JsonNode extensionsNode = root.get("custom_extensions");
if (!(extensionsNode instanceof ArrayNode)) {
- return Map.of();
+ return new LinkedHashMap<>();
Review Comment:
Used `ImmutableMap.of()` for the empty result and an `ImmutableMap.Builder`
for non-empty results to keep return mutability consistent and satisfy Error
Prone. The caller still copies the result into a mutable `LinkedHashMap`.
--
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]