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-32: Minor tweaks for POJO gen.
Date Tue, 27 Jan 2015 10:11:28 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-32 7871d381a -> d468943c8


# IGNITE-32: Minor tweaks for POJO gen.


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

Branch: refs/heads/ignite-32
Commit: d468943c84fe519ac2ac1aedfd9eb5555794a5cd
Parents: 7871d38
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Jan 27 17:11:28 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Jan 27 17:11:28 2015 +0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/schema/generator/PojoGenerator.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d468943c/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/PojoGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/PojoGenerator.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/PojoGenerator.java
index 09b5220..ec56f61 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/PojoGenerator.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/PojoGenerator.java
@@ -307,6 +307,9 @@ public class PojoGenerator {
 
                     case "byte":
                     case "short":
+                        add2Fmt(hash, first ? "int res = (int)%s;" : "res = 31 * res + (int)%s;",
javaName);
+                        break;
+
                     case "int":
                         add2Fmt(hash, first ? "int res = %s;" : "res = 31 * res + %s;", javaName);
                         break;
@@ -327,7 +330,7 @@ public class PojoGenerator {
                         add2Fmt(hash, (tempVar ? "ig_hash_temp" : "long ig_hash_temp") +
                             " = Double.doubleToLongBits(%s);", javaName);
 
-                        add2(hash, "");
+                        add0(hash, "");
 
                         add2Fmt(hash, first
                             ? "int res = (int)(ig_hash_temp ^ (ig_hash_temp >>>
32));"


Mime
View raw message