ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-330 Fixed generation.
Date Tue, 24 Mar 2015 11:15:55 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 214109fc5 -> d8cb6ca36


# IGNITE-330 Fixed generation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d8cb6ca3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d8cb6ca3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d8cb6ca3

Branch: refs/heads/ignite-45
Commit: d8cb6ca36fcd3f3321c057bfa3658ea339c6fbe4
Parents: 214109f
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Mar 24 18:15:54 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Mar 24 18:15:54 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/schema/generator/CodeGenerator.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8cb6ca3/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
index d17b215..17b813d 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
@@ -564,6 +564,7 @@ public class CodeGenerator {
         add0(src, "");
 
         boolean first = true;
+        boolean firstGrp = true;
 
         for (PojoDescriptor pojo : pojos) {
             String tbl = pojo.table();
@@ -618,7 +619,7 @@ public class CodeGenerator {
                 add0(src, "");
 
                 for (Map.Entry<String, Map<String, IndexItem>> group : groups.entrySet())
{
-                    add2(src, (first ? "LinkedHashMap<String, IgniteBiTuple<Class<?>,
Boolean>> " : "") +
+                    add2(src, (firstGrp ? "LinkedHashMap<String, IgniteBiTuple<Class<?>,
Boolean>> " : "") +
                             "grpItems = new LinkedHashMap<>();");
                     add0(src, "");
 
@@ -626,12 +627,14 @@ public class CodeGenerator {
                         IndexItem idxCol = grpItem.getValue();
 
                         add2(src, "grpItems.put(\"" + grpItem.getKey() + "\", " +
-                            "new IgniteBiTuple<>(" + javaTypeName(idxCol.type()) +
".class, " +
+                            "new IgniteBiTuple<Class<?>, Boolean>>(" + javaTypeName(idxCol.type())
+ ".class, " +
                             idxCol.descending() + "));");
                     }
 
                     add0(src, "");
                     add2(src, "grps.put(\"" + group.getKey() + "\", grpItems);");
+
+                    firstGrp = false;
                 }
 
                 add2(src, "type.setGroups(grps);");


Mime
View raw message