adutra commented on code in PR #3573:
URL: https://github.com/apache/polaris/pull/3573#discussion_r2770098103
##########
polaris-core/src/main/java/org/apache/polaris/core/config/PolarisConfigurationStore.java:
##########
@@ -57,36 +54,13 @@ public interface PolarisConfigurationStore {
* @param defaultValue the default value if the configuration key has no
value
* @return the current value or the supplied default value
* @param <T> the type of the configuration value
+ * @deprecated Use {@link RealmConfig}.
*/
+ @SuppressWarnings({"DeprecatedIsStillUsed", "removal"})
+ @Deprecated(forRemoval = true)
Review Comment:
Should the deprecation target the whole class?
##########
polaris-core/src/test/java/org/apache/polaris/core/storage/cache/StorageCredentialCacheTest.java:
##########
@@ -225,18 +225,8 @@ public void testCacheMissForAnotherPrincipal() {
Mockito.when(storageCredentialsVendor.getRealmConfig())
.thenReturn(
new RealmConfigImpl(
- new PolarisConfigurationStore() {
- @SuppressWarnings("unchecked")
- @Override
- public String getConfiguration(@Nonnull RealmContext ctx,
String configName) {
- if (configName.equals(
-
FeatureConfiguration.INCLUDE_PRINCIPAL_NAME_IN_SUBSCOPED_CREDENTIAL
- .key())) {
- return "true";
- }
- return null;
- }
- },
+ (rc, name) ->
+
Map.of(INCLUDE_PRINCIPAL_NAME_IN_SUBSCOPED_CREDENTIAL.key(), "true").get(name),
Review Comment:
nit: isn't this simpler?
```suggestion
INCLUDE_PRINCIPAL_NAME_IN_SUBSCOPED_CREDENTIAL.key().equals(name) ? "true" :
null,
```
I've seen other similar occurrences in this PR.
--
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]