nandorKollar commented on code in PR #3805:
URL: https://github.com/apache/polaris/pull/3805#discussion_r2821290119


##########
polaris-core/src/main/java/org/apache/polaris/core/config/PolarisConfiguration.java:
##########
@@ -173,17 +173,24 @@ public T resolveValue(
       return defaultValue();
     }
 
-    if (defaultValue() instanceof Boolean) {
+    Object defaultValue = defaultValue();
+
+    // If value is already the same type as the default, no conversion needed
+    if (defaultValue.getClass().isInstance(value)) {
+      return cast(value);
+    }
+
+    if (defaultValue instanceof Boolean) {

Review Comment:
   Ah okay, that makes sense. Do we plan to compile with Java 21 in the near 
future?



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