cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject git commit: replace {list}.iterator().next() with {list}.get(0)
Date Thu, 18 Apr 2013 21:58:30 GMT
Updated Branches:
  refs/heads/cassandra-1.2 262e006eb -> e2aeb7474


replace {list}.iterator().next() with {list}.get(0)


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

Branch: refs/heads/cassandra-1.2
Commit: e2aeb7474a5295796bc011ddd477715021cb1637
Parents: 262e006
Author: Dave Brosius <dbrosius@apache.org>
Authored: Thu Apr 18 17:57:55 2013 -0400
Committer: Dave Brosius <dbrosius@apache.org>
Committed: Thu Apr 18 17:57:55 2013 -0400

----------------------------------------------------------------------
 .../cassandra/cql3/statements/DeleteStatement.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e2aeb747/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java b/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
index cf7d2ac..eafe7c0 100644
--- a/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
@@ -73,7 +73,7 @@ public class DeleteStatement extends ModificationStatement
         boolean isRange = cfDef.isCompact ? !fullKey : (!fullKey || toRemove.isEmpty());
 
         if (!toRemove.isEmpty() && isRange)
-            throw new InvalidRequestException(String.format("Missing mandatory PRIMARY KEY
part %s since %s specified", firstEmpty, toRemove.iterator().next().columnName));
+            throw new InvalidRequestException(String.format("Missing mandatory PRIMARY KEY
part %s since %s specified", firstEmpty, toRemove.get(0).columnName));
 
         Set<ByteBuffer> toRead = null;
         for (Operation op : toRemove)


Mime
View raw message