Skip to content

Commit e27914a

Browse files
committed
Rename field and improve exception message (#154)
1 parent b0dadb0 commit e27914a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/lmdbjava/CursorIterable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public final class CursorIterable<T> implements
5353
private final Comparator<T> comparator;
5454
private final Cursor<T> cursor;
5555
private final KeyVal<T> entry;
56-
private boolean iterableReturned;
56+
private boolean iteratorReturned;
5757
private final KeyRange<T> range;
5858
private State state = REQUIRES_INITIAL_OP;
5959

@@ -85,10 +85,10 @@ public void close() {
8585
@Override
8686
@SuppressWarnings("checkstyle:AnonInnerLength")
8787
public Iterator<KeyVal<T>> iterator() {
88-
if (iterableReturned) {
89-
throw new IllegalStateException("Iterable can only be returned once");
88+
if (iteratorReturned) {
89+
throw new IllegalStateException("Iterator can only be returned once");
9090
}
91-
iterableReturned = true;
91+
iteratorReturned = true;
9292

9393
return new Iterator<KeyVal<T>>() {
9494
@Override

0 commit comments

Comments
 (0)