Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ public boolean hasNext() {
* columns in the {@code ResultSet}.
* @see java.util.Iterator#next()
* @throws RuntimeException if an SQLException occurs.
* @throws NoSuchElementException if there are no more rows in the {@code ResultSet}.
*/
@Override
public Object[] next() {
try {
return resultSet.next() ? this.convert.toArray(resultSet) : new Object[0];
if (!resultSet.next()) {
throw new NoSuchElementException("No more rows in the ResultSet");
}
return this.convert.toArray(resultSet);
} catch (final SQLException e) {
rethrow(e);
return null;
Expand Down