You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by rm...@apache.org on 2017/07/04 10:09:35 UTC

svn commit: r1800746 - in /geronimo/components/config/trunk/impl: pom.xml src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java

Author: rmannibucau
Date: Tue Jul  4 10:09:35 2017
New Revision: 1800746

URL: http://svn.apache.org/viewvc?rev=1800746&view=rev
Log:
fixing constructor setup of SystemPropertyConfigSource

Modified:
    geronimo/components/config/trunk/impl/pom.xml
    geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java

Modified: geronimo/components/config/trunk/impl/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/pom.xml?rev=1800746&r1=1800745&r2=1800746&view=diff
==============================================================================
--- geronimo/components/config/trunk/impl/pom.xml (original)
+++ geronimo/components/config/trunk/impl/pom.xml Tue Jul  4 10:09:35 2017
@@ -101,6 +101,10 @@
                         <INSTANCE>value-for-tck-since-we-ignore-empty</INSTANCE>
                         <UPSTART_INSTANCE>value-for-tck-since-we-ignore-empty</UPSTART_INSTANCE>
                     </environmentVariables>
+                    <systemPropertyVariables>
+                        <!-- TCKs assume it but this is not really a good option for prod -->
+                        <org.apache.geronimo.config.configsource.SystemPropertyConfigSource.copy>false</org.apache.geronimo.config.configsource.SystemPropertyConfigSource.copy>
+                    </systemPropertyVariables>
                     <forkCount>1</forkCount>
                     <reuseForks>true</reuseForks>
                     <trimStackTrace>false</trimStackTrace>

Modified: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java?rev=1800746&r1=1800745&r2=1800746&view=diff
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java (original)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java Tue Jul  4 10:09:35 2017
@@ -38,10 +38,10 @@ public class SystemPropertyConfigSource
     private final Map<String, String> instance;
 
     public SystemPropertyConfigSource() {
-        initOrdinal(400);
-        instance = "true".equalsIgnoreCase(getValue("org.apache.geronimo.config.configsource.SystemPropertyConfigSource.copy")) ?
+        instance = "true".equalsIgnoreCase(System.getProperty("org.apache.geronimo.config.configsource.SystemPropertyConfigSource.copy", "true")) ?
                 System.getProperties().stringPropertyNames().stream().collect(toMap(identity(), System::getProperty)) :
                 Map.class.cast(System.getProperties());
+        initOrdinal(400);
     }
 
     @Override