usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [1/2] usergrid git commit: Load properties into Guice by using the getProperty method instead of generic putAll from Map superclass as it getProperty could be overridden
Date Fri, 19 Aug 2016 19:28:21 GMT
Repository: usergrid
Updated Branches:
  refs/heads/master e8b9ad5b6 -> 80e9f37d6


Load properties into Guice by using the getProperty method instead of generic putAll from
Map superclass as it getProperty could be overridden


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7625b0d5
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7625b0d5
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7625b0d5

Branch: refs/heads/master
Commit: 7625b0d58599860442e8d76066bb86f27aeaf2c7
Parents: 494f1bb
Author: Michael Russo <mrusso@apigee.com>
Authored: Fri Aug 19 10:03:13 2016 -0700
Committer: Michael Russo <mrusso@apigee.com>
Committed: Fri Aug 19 10:03:13 2016 -0700

----------------------------------------------------------------------
 .../apache/usergrid/corepersistence/GuiceFactory.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/7625b0d5/stack/core/src/main/java/org/apache/usergrid/corepersistence/GuiceFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/GuiceFactory.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/GuiceFactory.java
index b3ce43b..17baa17 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/GuiceFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/GuiceFactory.java
@@ -26,9 +26,7 @@ import java.util.Properties;
 
 import javax.inject.Named;
 
-import com.google.inject.AbstractModule;
 import com.google.inject.Module;
-import org.apache.usergrid.persistence.collection.service.impl.ServiceModule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.FactoryBean;
@@ -123,10 +121,13 @@ public class GuiceFactory implements FactoryBean<Injector> {
                 logger.debug("Set Cassandra properties for Core Persistence: {}", cpProps.toString());
             }
 
-            // Make all Usergrid properties into Core Persistence config
-            cpProps.putAll( systemProperties );
-            //logger.debug("All properties fed to Core Persistence: " + cpProps.toString()
);
+            // Load the properties into the new CP Props Map by calling getProperty as the
methods may be overridden
+            for( Object propKey : systemProperties.keySet()){
+
+                cpProps.setProperty((String)propKey, systemProperties.getProperty((String)propKey));
 
+            }
+            //logger.debug("All properties fed to Core Persistence: " + cpProps.toString()
);
             ConfigurationManager.loadProperties( cpProps );
         }
         catch ( Exception e ) {


Mime
View raw message