[Dive4elements-commits] [PATCH] DC: fixed dc:group

Wald Commits scm-commit at wald.intevation.org
Tue May 21 16:30:26 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1369146614 -7200
# Node ID 06450ef553cc7264b24fed79d9369fe124b540aa
# Parent  2f50591aacc7765f503b4a59839b9888c10cbe15
DC: fixed dc:group

diff -r 2f50591aacc7 -r 06450ef553cc artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Fri May 17 18:21:53 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Tue May 21 16:30:14 2013 +0200
@@ -349,7 +349,6 @@
             String     expr,
             String     type
         ) {
-
             List<Object []> rows = rd.getRows();
             String [] columns = rd.getColumnLabels();
 
@@ -422,25 +421,20 @@
             Map<Object, ResultData> groups =
                 createGroupedResultData(orig, expr, type);
 
-            String [] columns = orig.getColumnLabels();
+            boolean debug = log.isDebugEnabled();
 
             try {
                 for (Map.Entry<Object, ResultData> entry: groups.entrySet()) {
-                    ResultData rd = entry.getValue();
+                    Object     key = entry.getKey();
+                    ResultData rd  = entry.getValue();
                     pair.setB(rd);
-                    groupExprStack.push(entry.getKey());
+                    groupExprStack.push(key);
+                    if (debug) {
+                        log.debug("group key: " + key);
+                    }
                     try {
-                        for (Object [] row: rd.getRows()) {
-                            frames.enter();
-                            try {
-                                frames.put(columns, row);
-                                for (int i = 0; i < S; ++i) {
-                                    build(parent, subs.item(i));
-                                }
-                            }
-                            finally {
-                                frames.leave();
-                            }
+                        for (int i = 0; i < S; ++i) {
+                            build(parent, subs.item(i));
                         }
                     }
                     finally {
@@ -478,8 +472,6 @@
 
             Object [] result = new Object[1];
 
-            log.debug("Foo");
-
             if (frames.getStore(container, result)) {
                 Object c = result[0];
                 if (c instanceof Object []) {


More information about the Dive4elements-commits mailing list