Skip to content

Commit

Permalink
Fix bug in hasNext when no result for a key is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
ctcttest committed Mar 1, 2013
1 parent 9bb791e commit befd460
Showing 1 changed file with 17 additions and 13 deletions.
Expand Up @@ -26,19 +26,23 @@ public ColumnFamilyResultIterator(ColumnFamilyResult<?, ?> res) {
this.res = res;
}

public boolean hasNext()
{
boolean retval = false;
if (isStart)
{
retval = res.hasResults();
}
else
{
retval = res.hasNext();
}
return retval;
}
public boolean hasNext()
{
boolean retval = false;
if (isStart)
{
if(res.hasResults() || res.hasNext())
{
retval = true;
}
}
else
{
retval = res.hasNext();
}
return retval;
}


public ColumnFamilyResult<?, ?> getRes()
{
Expand Down

0 comments on commit befd460

Please sign in to comment.