[
https://issues.apache.org/jira/browse/OFBIZ-9549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114845#comment-16114845 ]
Jacques Le Roux commented on OFBIZ-9549:
----------------------------------------
Hi Tobias,
I reviewed your patch, I globally like it. I have few questions and opinions.
# Why do you prefer a return to an else in close() (I see why in absolute() and hasNext()) ?
# Please explain
{code}
if (rowNum == 0 && resultSet.getType() != ResultSet.TYPE_FORWARD_ONLY) {
{code}
# While at it I'd prefer this formatting for this note
{code}
* PLEASE NOTE: Because of the nature of the JDBC ResultSet interface this method can be very inefficient
* It is much better to just use next() until it returns null
* For example, you could use the following to iterate through the results in an EntityListIterator:
{code}
Same in hasPrevious()
# I'd keep the comment
{code}
// do a quick game to see if the resultSet is empty:
// if we are not in the last or afterLast positions and we haven't made any values yet, the result set is empty so return false
{code}
in hasPrevious()
# Why did you prefer an ArrayList vs a LinkedList in getCompleteList() and getPartialList(). Did you make some performance reviews using a profiler?
Thanks!
> Refactor EntityListIterator
> ---------------------------
>
> Key: OFBIZ-9549
> URL:
https://issues.apache.org/jira/browse/OFBIZ-9549> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: Trunk
> Reporter: Tobias Laufkötter
> Assignee: Jacques Le Roux
> Priority: Minor
> Attachments: OFBIZ-9549.patch
>
>
> The EntityListIterator contains duplicate code and has need for refactoring in general.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)