Skip to content

Commit

Permalink
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -210,7 +210,7 @@ public boolean hasNext() {

@Override
public Map.Entry<Object, Object> next() {
if (entry == null) {
if (!hasNext()) {
throw new NoSuchElementException();
}

Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@

import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;

public abstract class PackedArrayStrategy {

@@ -137,6 +138,10 @@ public boolean hasNext() {

@Override
public Map.Entry<Object, Object> next() {
if (!hasNext()) {
throw new NoSuchElementException();
}

final int finalIndex = index;

final Map.Entry<Object, Object> entryResult = new Map.Entry<Object, Object>() {

0 comments on commit 6d0d774

Please sign in to comment.