cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r943566 - /cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
Date Wed, 12 May 2010 16:15:26 GMT
Author: gdusbabek
Date: Wed May 12 16:15:26 2010
New Revision: 943566

URL: http://svn.apache.org/viewvc?rev=943566&view=rev
Log:
avoid NPE when no keyspaces are defined in yaml. Patch by Sylvain Lebresne, reviewd by gdusbabek.
CASSANDRA-1080

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=943566&r1=943565&r2=943566&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Wed May 12
16:15:26 2010
@@ -388,9 +388,9 @@ public class DatabaseDescriptor
                 Table.open(def.name);
             }
             
-            // since we loaded definitions from local storage, log a warning if definitions
exist in xml.
+            // since we loaded definitions from local storage, log a warning if definitions
exist in yaml.
             
-            if (conf.keyspaces.size() > 0)
+            if (conf.keyspaces != null && conf.keyspaces.size() > 0)
                 logger.warn("Schema definitions were defined both locally and in " + STORAGE_CONF_FILE
+
                     ". Definitions in " + STORAGE_CONF_FILE + " were ignored.");
             



Mime
View raw message