Last few changes

Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d7121b5a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d7121b5a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d7121b5a

Branch: refs/heads/feature/GEODE-1466
Commit: d7121b5a952624269e94ce4ee9a7e9bb0de9130d
Parents: 7eb8302
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Oct 13 10:14:31 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Thu Oct 13 10:15:05 2016 -0700

----------------------------------------------------------------------
 .../distributed/internal/DistributionConfigImpl.java     |  2 +-
 .../java/org/apache/geode/internal/ConfigSource.java     | 11 +++++------
 .../org/apache/geode/internal/PropertiesResolver.java    | 10 +++++++++-
 3 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7121b5a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfigImpl.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfigImpl.java
index 6e7333e..db8df66 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfigImpl.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfigImpl.java
@@ -851,7 +851,7 @@ public class DistributionConfigImpl extends 
AbstractDistributionConfig implement
   public DistributionConfigImpl(Properties nonDefault, boolean 
ignoreGemFirePropsFile, boolean isConnected) {
     HashMap props = new HashMap();
     if (!ignoreGemFirePropsFile) {//For admin bug #40434
-      
props.putAll(loadPropertiesFromURL(DistributedSystem.getPropertyFileURL(), 
false));
+      
props.putAll(loadPropertiesFromURL(DistributedSystem.getPropertyFileURL(), 
false)); // GEODE-1466
     }
     
props.putAll(loadPropertiesFromURL(DistributedSystem.getSecurityPropertiesFileURL(),
 true));
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7121b5a/geode-core/src/main/java/org/apache/geode/internal/ConfigSource.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/ConfigSource.java 
b/geode-core/src/main/java/org/apache/geode/internal/ConfigSource.java
index 87309f6..b5ae841 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/ConfigSource.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/ConfigSource.java
@@ -32,13 +32,12 @@ public class ConfigSource implements Serializable {
   private ConfigSource(Type t) {
     this.type = t;
     switch (t) {
-      case API: this.description = "api"; break; // Properties instance passed 
in to DistributedSystem.connect
+      case API: this.description = "api"; break;                         // 
Properties instance passed in to DistributedSystem.connect
       case SYSTEM_PROPERTY: this.description = "system property"; break; // 
System.getProperties
-      case FILE: this.description = "file"; break; // gemfire.properties file
-      case SECURE_FILE: this.description = "secure file"; break; // 
gfsecurity.properties file
-      case XML: this.description = "cache.xml"; break; // cache.xml file
-      case RUNTIME: this.description = "runtime modification"; break; // 
RuntimeDistributionConfigImpl setter
-      case LAUNCHER: this.description = "launcher"; break; // Launcher setter
+      case FILE: this.description = "file"; break;                       // 
gemfire.properties file
+      case SECURE_FILE: this.description = "secure file"; break;         // 
gfsecurity.properties file
+      case XML: this.description = "cache.xml"; break;                   // 
cache.xml file
+      case RUNTIME: this.description = "runtime modification"; break;    // 
RuntimeDistributionConfigImpl setter
       default:
         this.description = "";
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7121b5a/geode-core/src/main/java/org/apache/geode/internal/PropertiesResolver.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/PropertiesResolver.java 
b/geode-core/src/main/java/org/apache/geode/internal/PropertiesResolver.java
index a07e3b7..b33ae79 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/PropertiesResolver.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/PropertiesResolver.java
@@ -17,7 +17,6 @@
 package org.apache.geode.internal;
 
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -34,6 +33,15 @@ import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.lang.StringUtils;
 import org.apache.geode.internal.util.IOUtils;
 
+/**
+ * Order of preference:
+ * <ul>
+ * <li>system property specified value
+ * <li>builder specified value (note: this becomes a system property)
+ * <li>overridden default value
+ * <li>default value
+ * </ul>
+ */
 public class PropertiesResolver {
 
   public static final String GEODE_PREFIX = "geode.";

Reply via email to