summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/stats
diff options
context:
space:
mode:
authorRobert Antoni Buj i Gelonch <robert.buj@gmail.com>2014-10-11 17:08:23 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-19 10:10:59 +0000
commita8e723ed3eed44a85714abf1cb04b74178d2424f (patch)
tree7c7ac79e1a2420d8446c0f847cd643dd7db19cd5 /qadevOOo/runner/stats
parentddac8522821ae288d4ce1533f9ebe8daf9e2d935 (diff)
runner: Iterate over each Entry in a Map
Change-Id: I48de54ea88e7fd9f2d903c172eb2b6e1a5b73edd Reviewed-on: https://gerrit.libreoffice.org/11918 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo/runner/stats')
-rw-r--r--qadevOOo/runner/stats/SQLExecution.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/qadevOOo/runner/stats/SQLExecution.java b/qadevOOo/runner/stats/SQLExecution.java
index bb50dce7b1a5..34f8949b7772 100644
--- a/qadevOOo/runner/stats/SQLExecution.java
+++ b/qadevOOo/runner/stats/SQLExecution.java
@@ -22,9 +22,10 @@ import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
+
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
+import java.util.Map;
import java.util.StringTokenizer;
/**
@@ -229,10 +230,9 @@ public class SQLExecution {
execute(sqlCommand.get(i), sqlOutput, update);
// merge output with input
if (!update && mergeOutputIntoInput) {
- Iterator<String> keys = sqlOutput.keySet().iterator();
- while(keys.hasNext()) {
- String key = keys.next();
- String[]val = sqlOutput.get(key);
+ for (Map.Entry<String, String[]> entry : sqlOutput.entrySet()) {
+ String key = entry.getKey();
+ String[] val = entry.getValue();
if (val != null && val.length != 0) {
if (val.length == 1)
sqlInput.put(key, val[0]);