LuciferYang opened a new pull request, #13237:
URL: https://github.com/apache/gravitino/pull/13237

   ### What changes were proposed in this pull request?
   
   `CustomContentDTO` now overrides `rules()` to return `customRules`, 
restoring symmetry with the domain `CustomContent` and the sibling 
`IcebergCompactionContentDTO`.
   
   ### Why are the changes needed?
   
   It inherited `PolicyContent.rules()`, whose default throws 
`UnsupportedOperationException`, so code holding the deserialized DTO got an 
exception where the domain object returned the rules.
   
   Fix: #13236
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API change. `CustomContentDTO.rules()` now returns `customRules` instead 
of throwing `UnsupportedOperationException`. The standard REST round-trip 
converts to the domain object and is unaffected.
   
   ### How was this patch tested?
   
   Added `TestPolicyContentDTO`, which pins that `CustomContentDTO.rules()` 
returns `customRules`; it fails on the pre-fix tree with 
`UnsupportedOperationException` and passes after the fix.
   


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