You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/11/14 07:26:22 UTC
[isis] branch master updated: ISIS-1714: uses add rather than put
for the config properties provided by the app manifest
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 3605c0c ISIS-1714: uses add rather than put for the config properties provided by the app manifest
3605c0c is described below
commit 3605c0c20c164fbd48b9d3666b376a4281379d41
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Nov 13 23:20:56 2017 +0000
ISIS-1714: uses add rather than put for the config properties provided by the app manifest
---
.../systemusinginstallers/IsisComponentProvider.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index 6616d68..cf7b30b 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -97,7 +97,7 @@ public abstract class IsisComponentProvider {
findAndRegisterTypes(appManifest);
specifyServicesAndRegisteredEntitiesUsing(appManifest);
- overrideConfigurationUsing(appManifest);
+ addToConfigurationUsing(appManifest);
this.services = new ServicesInstallerFromConfigurationAndAnnotation(getConfiguration()).getServices();
@@ -207,11 +207,11 @@ public abstract class IsisComponentProvider {
};
}
- private void overrideConfigurationUsing(final AppManifest appManifest) {
+ private void addToConfigurationUsing(final AppManifest appManifest) {
final Map<String, String> configurationProperties = appManifest.getConfigurationProperties();
if (configurationProperties != null) {
for (Map.Entry<String, String> configProp : configurationProperties.entrySet()) {
- putConfigurationProperty(configProp.getKey(), configProp.getValue());
+ addConfigurationProperty(configProp.getKey(), configProp.getValue());
}
}
}
@@ -226,6 +226,16 @@ public abstract class IsisComponentProvider {
this.configuration.put(key, value);
}
+ /**
+ * TODO: hacky, {@link IsisConfiguration} is meant to be immutable...
+ */
+ void addConfigurationProperty(final String key, final String value) {
+ if(value == null) {
+ return;
+ }
+ this.configuration.add(key, value);
+ }
+
//endregion
//region > provideAuth*
--
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <co...@isis.apache.org>'].