lasdf1234 commented on code in PR #14520:
URL: https://github.com/apache/gravitino/pull/14520#discussion_r4452568363


##########
common/src/main/java/org/apache/gravitino/dto/requests/PolicyCreateRequest.java:
##########
@@ -119,6 +120,9 @@ public void validate() throws IllegalArgumentException {
         StringUtils.isNotBlank(policyType), "\"policyType\" is required and 
cannot be empty");
     Preconditions.checkArgument(
         policyContent != null, "\"content\" is required and cannot be null");
+    // Resolve policyType before content.validate(): Jackson may have fallen 
back to custom content
+    // for an unknown or mis-cased type, and custom content rules would 
obscure the type error.
+    Policy.BuiltInType.fromPolicyType(policyType);

Review Comment:
   addressed in df1dcad53



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