Skip to content

Conversation

@boggle
Copy link
Contributor

@boggle boggle commented Apr 5, 2016

As per discusssion w Nigel / same-named trello card

Also cleans up InternalStatementResult impl quite a bit which was using recursion in weird places.

@boggle boggle force-pushed the 1.0-consumption-fixes branch 2 times, most recently from b0e60d0 to 3aafe26 Compare April 6, 2016 13:02
return emptyList();
}
else if ( position == -1 && hasNext() )
if ( hasNext() )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't this be rewritten to a while( hasNext() )... instead of if ( hasNext() ) ... do {...} while ( hasNext() )...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so that for the empty case we can use emptyList() which returns a constant. For the non-empty case we then already know that hasNext() is true which is why that case uses a do while loop

@boggle boggle force-pushed the 1.0-consumption-fixes branch from 13e5483 to 3990383 Compare April 8, 2016 11:36
@boggle boggle changed the title Clarify semantics of statement result methods [DO NOT MERGE] Clarify semantics of statement result methods Apr 8, 2016
@boggle boggle changed the title Clarify semantics of statement result methods Clarify semantics of statement result methods [DO NOT MERGE] Apr 8, 2016
@zhenlineo
Copy link
Contributor

What's the status of this PR? It is good to me. Shall we merge?

@pontusmelke pontusmelke merged commit 744e9ab into neo4j:1.0 Apr 11, 2016
@pontusmelke pontusmelke deleted the 1.0-consumption-fixes branch April 11, 2016 11:15
@technige technige changed the title Clarify semantics of statement result methods [DO NOT MERGE] Clarify semantics of statement result methods Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants