cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: fix typo: wrong if guard variable
Date Fri, 23 Dec 2016 01:20:11 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 b98767868 -> eaced9a54


fix typo: wrong if guard variable


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

Branch: refs/heads/cassandra-3.11
Commit: eaced9a541d09d55973b6f88d720e16ac948a559
Parents: b987678
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Thu Dec 22 20:19:53 2016 -0500
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Thu Dec 22 20:19:53 2016 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/index/SecondaryIndexManager.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eaced9a5/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
index 0cb0334..6adefbd 100644
--- a/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/index/SecondaryIndexManager.java
@@ -426,7 +426,7 @@ public class SecondaryIndexManager implements IndexRegistry
             {
                 Class<? extends Index> indexClass = FBUtilities.classForName(className,
"Index");
                 Constructor<? extends Index> ctor = indexClass.getConstructor(ColumnFamilyStore.class,
IndexMetadata.class);
-                newIndex = (Index)ctor.newInstance(baseCfs, indexDef);
+                newIndex = ctor.newInstance(baseCfs, indexDef);
             }
             catch (Exception e)
             {
@@ -615,7 +615,7 @@ public class SecondaryIndexManager implements IndexRegistry
             return DEFAULT_PAGE_SIZE;
 
         int columnsPerRow = baseCfs.metadata.partitionColumns().regulars.size();
-        if (meanCellsPerPartition <= 0)
+        if (columnsPerRow <= 0)
             return DEFAULT_PAGE_SIZE;
 
         int meanRowsPerPartition = meanCellsPerPartition / columnsPerRow;


Mime
View raw message