diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-11-12 02:19:41 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-11-12 02:19:41 +0000 |
commit | c35c73e7ef8c83d5e5155398cfef749d48c8e38f (patch) | |
tree | dff80dacd783a9034957999e467a24a8de39f980 /java/src/Freeze/Map.java | |
parent | disable parser/scanner rules in VC projects (diff) | |
download | ice-c35c73e7ef8c83d5e5155398cfef749d48c8e38f.tar.bz2 ice-c35c73e7ef8c83d5e5155398cfef749d48c8e38f.tar.xz ice-c35c73e7ef8c83d5e5155398cfef749d48c8e38f.zip |
Bug fixes: check if cursor is not null in EntryIterator.getNext(), cursor
is null if the db is empty and he evictor iterator now closes again the
db iterator (not the map iterator).
Diffstat (limited to 'java/src/Freeze/Map.java')
-rw-r--r-- | java/src/Freeze/Map.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/Freeze/Map.java b/java/src/Freeze/Map.java index a9a06943eeb..d7c936fe2a4 100644 --- a/java/src/Freeze/Map.java +++ b/java/src/Freeze/Map.java @@ -411,6 +411,7 @@ public abstract class Map extends java.util.AbstractMap // // Clone the cursor so that error handling is simpler. // + assert _cursor != null; DBCursor clone = _cursor._clone(); try @@ -463,6 +464,7 @@ public abstract class Map extends java.util.AbstractMap private Entry getEntry() { + assert _cursor != null; _cursor.curr(_keyHolder, _valueHolder); return new Entry(Map.this, _cursor, _keyHolder.value, _valueHolder.value); } @@ -470,7 +472,7 @@ public abstract class Map extends java.util.AbstractMap private boolean getNext() { - if(_next == null) + if(_next == null && _cursor != null) { if(_cursor.next()) { |