cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [1/3] cassandra git commit: Fix coverity warning for potential NPE (CASSANDRA-6717 follow up)
Date Tue, 18 Aug 2015 20:30:16 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 f50e9321f -> 0d7b232bd
  refs/heads/trunk 4dbdefb65 -> 9f54e8f6d


Fix coverity warning for potential NPE (CASSANDRA-6717 follow up)


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

Branch: refs/heads/cassandra-3.0
Commit: 0d7b232bdb406c2a49784f175ea4c8ab9e245cef
Parents: f50e932
Author: Sam Tunnicliffe <sam@beobal.com>
Authored: Tue Aug 18 21:28:17 2015 +0100
Committer: Sam Tunnicliffe <sam@beobal.com>
Committed: Tue Aug 18 21:28:17 2015 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/schema/SchemaKeyspace.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d7b232b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
index f77b2bc..f93ccfd 100644
--- a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
+++ b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
@@ -1434,13 +1434,13 @@ public final class SchemaKeyspace
 
         Set<String> targetColumnNames = row.getSet("target_columns", UTF8Type.instance);
         assert targetType == IndexMetadata.TargetType.COLUMN : "Per row indexes with dynamic
target columns are not supported yet";
-        assert targetColumnNames.size() == 1 : "Secondary indexes targetting multiple columns
are not supported yet";
 
         Set<ColumnIdentifier> targetColumns = new HashSet<>();
         // if it's not a CQL table, we can't assume that the column name is utf8, so
         // in that case we have to do a linear scan of the cfm's columns to get the matching
one
         if (targetColumnNames != null)
         {
+            assert targetColumnNames.size() == 1 : "Secondary indexes targetting multiple
columns are not supported yet";
             targetColumnNames.forEach(targetColumnName -> {
                 if (cfm.isCQLTable())
                     targetColumns.add(ColumnIdentifier.getInterned(targetColumnName, true));


Mime
View raw message