Skip to content

Commit

Permalink
use result.stringPropertyNames() instead of result.putAll(properties)
Browse files Browse the repository at this point in the history
  • Loading branch information
xsalefter committed Mar 1, 2023
1 parent a0f832e commit 4f4f55d
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,15 @@ public String getString(final String propertyName) {
@Override
public Properties getProperties() {
final Properties result = new Properties();
result.putAll(properties);
// using properties.stringPropertyNames() because `result.putAll(properties)` not working when running inside
// tomcat, if we put configuration in tomcat's catalina.properties
// See:
// - https://github.com/killbill/technical-support/issues/61
// - https://github.com/killbill/technical-support/issues/67
//
// We have TestDefaultKillbillConfigSource#testGetProperties() that cover this, but seems like this is similar
// to one of our chicken-egg problem? (see loadPropertiesFromFileOrSystemProperties() below)
properties.stringPropertyNames().forEach(key -> result.setProperty(key, properties.getProperty(key)));
return result;
}

Expand Down

0 comments on commit 4f4f55d

Please sign in to comment.