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/13 23:20:59 UTC

[isis] 01/01: ISIS-1714: uses add rather than put for the config properties

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-1714
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 4b32677ee691a303b940ee67869a30e86a0b5c84
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
---
 .../runtime/systemusinginstallers/IsisComponentProvider.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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..5ed9f3a 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
@@ -211,7 +211,7 @@ public abstract class IsisComponentProvider {
         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>.