You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:17:16 UTC

[sling-org-apache-sling-settings] 02/04: SLING-4482 : Settings plugin might not show current values for sling properties

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

rombert pushed a commit to annotated tag org.apache.sling.settings-1.3.6
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-settings.git

commit 91c8c18309f1e985970a8c25484a7a45f080b5e0
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Mar 9 07:58:26 2015 +0000

    SLING-4482 : Settings plugin might not show current values for sling properties
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/settings@1665140 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/settings/impl/SlingPropertiesPrinter.java    | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/main/java/org/apache/sling/settings/impl/SlingPropertiesPrinter.java b/src/main/java/org/apache/sling/settings/impl/SlingPropertiesPrinter.java
index de2606b..6ad1bab 100644
--- a/src/main/java/org/apache/sling/settings/impl/SlingPropertiesPrinter.java
+++ b/src/main/java/org/apache/sling/settings/impl/SlingPropertiesPrinter.java
@@ -58,7 +58,15 @@ public class SlingPropertiesPrinter {
                 final InputStream is = url.openStream();
                 final Properties tmp = new Properties();
                 tmp.load(is);
+                // update props
+                for(final Object key : tmp.keySet()) {
+                    final Object value = bundleContext.getProperty(key.toString());
+                    if ( value != null ) {
+                        tmp.put(key, value);
+                    }
+                }
                 props = tmp;
+
             } catch (IOException ioe) {
                 LOGGER.warn("Unable to read sling properties from " + propUrl, ioe);
             }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.