collado-mike commented on code in PR #493:
URL: https://github.com/apache/polaris/pull/493#discussion_r1870154288
##########
polaris-service/src/main/java/org/apache/polaris/service/auth/DefaultPolarisAuthenticator.java:
##########
@@ -36,16 +36,7 @@ public Optional<AuthenticatedPolarisPrincipal>
authenticate(String credentials)
return getPrincipal(decodedToken);
}
- @Override
- public void setMetaStoreManagerFactory(MetaStoreManagerFactory
metaStoreManagerFactory) {
- super.setMetaStoreManagerFactory(metaStoreManagerFactory);
- if (tokenBrokerFactory instanceof HasMetaStoreManagerFactory) {
- ((HasMetaStoreManagerFactory) tokenBrokerFactory)
- .setMetaStoreManagerFactory(metaStoreManagerFactory);
- }
- }
-
- @JsonProperty("tokenBroker")
+ @Inject
Review Comment:
Objects that are constructed during the configuration parsing have to have
no-arg constructors. We can do field or setter injection, but not constructor
injection for these types. This includes the `Authenticator`, the
`TokenBroker`, the `MetaStoreManagerFactory` and all other types defined in the
`PolarisApplicationConfig`.
--
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]