changeset 8089:7e55790da464

Use list() instead of iterator(). Why does this not work?
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 15 Aug 2014 18:01:06 +0200
parents b834caf0a4f0
children 8a5466f82b70
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java	Mon Aug 11 18:34:21 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java	Fri Aug 15 18:01:06 2014 +0200
@@ -9,7 +9,7 @@
 
 import java.sql.Timestamp;
 import java.util.HashMap;
-import java.util.Iterator;
+import java.util.List;
 
 import net.sf.ehcache.Cache;
 import net.sf.ehcache.Element;
@@ -120,8 +120,9 @@
         HashMap<Integer, SedimentLoadData.Station> id2station
             = new HashMap<Integer, SedimentLoadData.Station>();
 
-        for (Iterator iter = sqlQuery.iterate(); iter.hasNext();) {
-            Object [] row = (Object [])iter.next();
+        List<Object[]> list = sqlQuery.list();
+
+        for (Object [] row: list) {
 
             Integer   sl_id            = (Integer)row[0];
             Integer   sl_kind          = (Integer)row[1];

http://dive4elements.wald.intevation.org