LuciferYang opened a new issue, #13236: URL: https://github.com/apache/gravitino/issues/13236
**Version** main branch **Describe what's wrong** `CustomContentDTO` inherits `PolicyContent.rules()`, whose default throws `UnsupportedOperationException`, while the api-side domain `CustomContent` returns `customRules` from `rules()`. Code holding the deserialized DTO gets an exception where the domain object returns the rules. **Error message and/or stacktrace** `java.lang.UnsupportedOperationException` from `PolicyContent.rules()` when called on a `CustomContentDTO`. **How to reproduce** Deserialize a custom policy content into a `CustomContentDTO` and call `rules()`; it throws `UnsupportedOperationException` instead of returning `customRules`. **Additional context** The standard REST round-trip converts to the domain object and never hits this, but `CustomContentDTO` is a public type whose `rules()` is a trap. The sibling `IcebergCompactionContentDTO` overrides `rules()`. Found during a code audit of the `common` module. -- 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]
