jerryshao commented on code in PR #10871:
URL: https://github.com/apache/gravitino/pull/10871#discussion_r3153734452
##########
server/src/test/java/org/apache/gravitino/server/web/rest/TestCatalogOperations.java:
##########
@@ -588,6 +588,22 @@ public void testSetCatalog() {
Assertions.assertEquals(RuntimeException.class.getSimpleName(),
errorResponse1.getType());
}
+ @Test
+ public void testCreateCatalogWithNullRequest() {
+ Response resp =
+ target("/metalakes/metalake1/catalogs")
+ .request(MediaType.APPLICATION_JSON_TYPE)
+ .accept("application/vnd.gravitino.v1+json")
+ .post(Entity.entity("null", MediaType.APPLICATION_JSON_TYPE));
Review Comment:
As I mentioned in other PR, parsing "null" will not normally happen, I
really doubt the necessity of such a fix.
Another thing, if we really want to fix this, it is better to fix this in
the object mapper. We should probably not allow such deserialization.
--
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]