xiaozcy commented on code in PR #7881:
URL: https://github.com/apache/gravitino/pull/7881#discussion_r2253070830


##########
catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java:
##########
@@ -614,6 +625,18 @@ private void doRemoveProperty(
     entityProperties.remove(change.property());
   }
 
+  private void doUpdateUri(Map<String, String> entityUris, 
ModelVersionChange.UpdateUri change) {
+    entityUris.replace(change.uriName(), change.newUri());
+  }
+
+  private void doAddUri(Map<String, String> entityUris, 
ModelVersionChange.AddUri change) {
+    entityUris.putIfAbsent(change.uriName(), change.uri());
+  }
+
+  private void doRemoveUri(Map<String, String> entityUris, 
ModelVersionChange.RemoveUri change) {
+    entityUris.remove(change.uriName());
+  }

Review Comment:
   I tend to do it silently, and that's exactly how it is implemented at 
present:
   1. use `Map#replace`  to update URI
   2. use `Map#putIfAbsent` to add URI
   3. use `Map#remove` to remove URI



-- 
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]

Reply via email to