Skip to content

Conversation

@groldan
Copy link
Member

@groldan groldan commented Oct 13, 2025

Fix a bug where GeoWebCacheEnvironment.resolveValueIfEnabled(String, Class) won't use the resolved value from the env variable or system property when a boolean is requested.

--- a/geowebcache/core/src/main/java/org/geowebcache/GeoWebCacheEnvironment.java
+++ b/geowebcache/core/src/main/java/org/geowebcache/GeoWebCacheEnvironment.java
@@ -178,7 +178,7 @@ public <T> Optional<T> resolveValueIfEnabled(final String value, Class<T> type)
         } else if (type.isAssignableFrom(Boolean.class)) {
             if (!validateBoolean(resultValue))
                 throw new IllegalArgumentException("Illegal String parameter: Resolved value is not a boolean.");
-            Boolean boolValue = Boolean.valueOf(value);
+            Boolean boolValue = Boolean.valueOf(resultValue);
             return (Optional<T>) Optional.of(boolValue);
         }

…rom resolved value

Fix a bug where GeoWebCacheEnvironment.resolveValueIfEnabled(String,
Class) won't use the resolved value from the env variable or system
property when a boolean is requested.
@aaime
Copy link
Member

aaime commented Oct 13, 2025

Looks good to me

@aaime aaime merged commit ebc715a into GeoWebCache:main Oct 13, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants