nevzheng opened a new pull request, #12202: URL: https://github.com/apache/gravitino/pull/12202
### What changes were proposed in this pull request? This pull request: - Injects `Supplier<OwnerDispatcher>` and `CatalogManager` into `TableHookDispatcher`. - Wires both dependencies from `GravitinoEnv`. - Replaces singleton- and reflection-based test setup with isolated mocks. - Covers normalized ownership, disabled authorization, privilege removal, privilege rename, and owner-assignment failure. GravitinoEnv becomes composition-root-only in the touched areas; not deleted. ### Why are the changes needed? `TableHookDispatcher` currently resolves collaborators through `GravitinoEnv.getInstance()`. This makes its dependencies implicit and forces tests to mutate shared singleton state. Constructor injection makes the dependency relationship explicit while preserving lazy owner resolution and authorization-disabled behavior. Fixes #12201 ### Does this PR introduce _any_ user-facing change? No. This changes internal server wiring and tests only. It does not change public APIs, REST contracts, or configuration. ### How was this patch tested? - `./gradlew spotlessApply` - `./gradlew :core:test :server:test -PskipITs` -- 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]
