cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/6] git commit: cleanup
Date Fri, 02 May 2014 18:57:24 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 2e9ac19a4 -> 62af7d0c9
  refs/heads/cassandra-2.1 a811dd0e9 -> 3089c92d4
  refs/heads/trunk 08d5f26e3 -> ee64bf737


cleanup


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/62af7d0c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/62af7d0c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/62af7d0c

Branch: refs/heads/cassandra-2.0
Commit: 62af7d0c9d12c642fcc749f64f3db096013d2e41
Parents: 2e9ac19
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri May 2 13:56:08 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri May 2 13:56:21 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/locator/SnitchProperties.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/62af7d0c/src/java/org/apache/cassandra/locator/SnitchProperties.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/SnitchProperties.java b/src/java/org/apache/cassandra/locator/SnitchProperties.java
index a78b2a7..52268da 100644
--- a/src/java/org/apache/cassandra/locator/SnitchProperties.java
+++ b/src/java/org/apache/cassandra/locator/SnitchProperties.java
@@ -35,14 +35,13 @@ public class SnitchProperties
     {
         properties = new Properties();
         InputStream stream = null;
-        String configURL = System.getProperty("cassandra.rackdc.properties");
+        String configURL = System.getProperty(RACKDC_PROPERTY_FILENAME);
         try
         {
             URL url = new URL(configURL);
             if (configURL == null)
-                url = SnitchProperties.class.getClassLoader().getResource(
-                        "cassandra-rackdc.properties");
-            stream = url.openStream();
+                url = SnitchProperties.class.getClassLoader().getResource(RACKDC_PROPERTY_FILENAME);
+            stream = url.openStream(); // catch block handles potential NPE
             properties.load(stream);
         }
         catch (Exception e)


Mime
View raw message