orbiter 18 years ago
parent 3bb3df3fc0
commit 3ef77d2030

@ -333,16 +333,20 @@ public class kelondroMapObjects extends kelondroObjects {
} }
public Object next() { public Object next() {
final String nextKey = (String) keyIterator.next(); String nextKey;
if (nextKey == null) { Map map;
finish = true; while (keyIterator.hasNext()) {
return null; nextKey = (String) keyIterator.next();
if (nextKey == null) {
finish = true;
return null;
}
map = getMap(nextKey);
if (map == null) continue; // circumvention of a modified exception
map.put("key", nextKey);
return map;
} }
final Map map = getMap(nextKey); throw new kelondroException("no more elements available");
//assert (map != null) : "nextKey = " + nextKey;
if (map == null) throw new kelondroException("no more elements available");
map.put("key", nextKey);
return map;
} }
public void remove() { public void remove() {

Loading…
Cancel
Save