orbiter 18 years ago
parent 3bb3df3fc0
commit 3ef77d2030

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

Loading…
Cancel
Save