LuciferYang commented on code in PR #13440:
URL: https://github.com/apache/gravitino/pull/13440#discussion_r4084078206
##########
core/src/main/java/org/apache/gravitino/secret/SecretAlterChanges.java:
##########
@@ -57,19 +59,27 @@ public static Pair<CatalogChange[], List<SecretMaterial>>
prepareCatalogChanges(
currentProperties == null ? new HashMap<>() : new
HashMap<>(currentProperties);
List<CatalogChange> out = new ArrayList<>(changes.length);
List<SecretMaterial> written = new ArrayList<>();
+ List<SecretUrn> replacedUrns = new ArrayList<>();
+ Map<String, String> originalProperties = Map.copyOf(properties);
Review Comment:
Done. `originalProperties` is now a null-tolerant `new
HashMap<>(properties)` snapshot instead of `Map.copyOf(...)`. Entity property
maps are not guaranteed free of null values, and `Map.copyOf` would NPE on
them, which the pre-fix code did not; the snapshot is only read (the
`containsValue` filter), so a plain copy is fine.
--
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]