Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36B98182D1 for ; Tue, 18 Aug 2015 20:30:17 +0000 (UTC) Received: (qmail 70506 invoked by uid 500); 18 Aug 2015 20:30:17 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 70464 invoked by uid 500); 18 Aug 2015 20:30:17 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 70442 invoked by uid 99); 18 Aug 2015 20:30:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2015 20:30:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DEE6BE048E; Tue, 18 Aug 2015 20:30:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: samt@apache.org To: commits@cassandra.apache.org Date: Tue, 18 Aug 2015 20:30:16 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] cassandra git commit: Fix coverity warning for potential NPE (CASSANDRA-6717 follow up) 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 Authored: Tue Aug 18 21:28:17 2015 +0100 Committer: Sam Tunnicliffe 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 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 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));