mchades commented on code in PR #12798:
URL: https://github.com/apache/gravitino/pull/12798#discussion_r3921290900
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogNormalizeDispatcher.java:
##########
@@ -148,6 +148,19 @@ public void testConnection(NameIdentifier ident) throws
Exception {
dispatcher.testConnection(ident);
}
+ @Override
+ public void testConnection(NameIdentifier ident, CatalogChange... changes)
throws Exception {
+ validateCatalogName(ident.name());
+ Arrays.stream(changes)
+ .forEach(
+ change -> {
Review Comment:
A null `changes` array cannot reach this dispatcher through the current
server call path. When the request body is absent, the REST layer calls
`testConnection(ident)`; otherwise, `stream().toArray(...)` always produces a
non-null array, including for an empty updates list. The hook and event
dispatchers only forward that array.
There are no other current callers that pass null here, so an additional
check in the normalization dispatcher is unnecessary.
--
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]