mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
There was no override of properties related to HttpClientConfig, whic… (#2120)
* There was no override of properties related to HttpClientConfig, which meant that if a property wasn't present in global-properties files, it wouldn't be registered and couldn't be provided through command line. I've amended that here
This commit is contained in:
committed by
GitHub
parent
e5886e2104
commit
6ba66513f2
@@ -85,17 +85,27 @@ public class HttpClientConfig
|
||||
this.keyStore = new AlfrescoKeyStoreImpl(sslEncryptionParameters.getKeyStoreParameters(), keyResourceLoader);
|
||||
this.trustStore = new AlfrescoKeyStoreImpl(sslEncryptionParameters.getTrustStoreParameters(), keyResourceLoader);
|
||||
|
||||
config = retrieveConfig(serviceName);
|
||||
config = retrieveConfig();
|
||||
checkUnsupportedProperties(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used for retrieving HttpClient config from Global Properties
|
||||
* @param serviceName name of used service
|
||||
* that can also have values provided/overridden through System Properties
|
||||
*
|
||||
* @return map of properties
|
||||
*/
|
||||
private Map<String, String> retrieveConfig(String serviceName)
|
||||
private Map<String, String> retrieveConfig()
|
||||
{
|
||||
Map<String, String> resultProperties = getHttpClientPropertiesForService(properties);
|
||||
Map<String, String> systemProperties = getHttpClientPropertiesForService(System.getProperties());
|
||||
|
||||
systemProperties.forEach((k, v) -> resultProperties.put(k, v)); //Override/Add to Global Properties results with values from System Properties
|
||||
|
||||
return resultProperties;
|
||||
}
|
||||
|
||||
private Map<String, String> getHttpClientPropertiesForService(Properties properties) {
|
||||
return properties.keySet().stream()
|
||||
.filter(key -> key instanceof String)
|
||||
.map(Object::toString)
|
||||
|
Reference in New Issue
Block a user