From de163b30be91808600dc1cf10688c7d06764a27a Mon Sep 17 00:00:00 2001 From: Dave Brosius Date: Sat, 22 Jun 2013 16:41:04 -0400 Subject: [PATCH] don't use an iterator just to get item 0 of a List --- .../me/prettyprint/cassandra/service/HColumnFamilyImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/me/prettyprint/cassandra/service/HColumnFamilyImpl.java b/core/src/main/java/me/prettyprint/cassandra/service/HColumnFamilyImpl.java index 1f8b94c01..69739ed66 100644 --- a/core/src/main/java/me/prettyprint/cassandra/service/HColumnFamilyImpl.java +++ b/core/src/main/java/me/prettyprint/cassandra/service/HColumnFamilyImpl.java @@ -303,7 +303,7 @@ public Column execute(Cassandra.Client cassandra) throws HectorException { queryLogger.debug("---------\nColumnFamily: {} slicePredicate: {}", columnFamilyName, activeSlicePredicate.toString()); } - K key = _keys.iterator().next(); + K key = _keys.get(0); List cosclist = cassandra.get_slice(keySerializer.toByteBuffer(key), columnParent, activeSlicePredicate.toThrift(), ThriftConverter.consistencyLevel(consistencyLevelPolicy.get(operationType)));