ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [03/10] incubator-ignite git commit: # IGNITE-375 Review.
Date Thu, 19 Mar 2015 14:57:11 GMT
# IGNITE-375 Review.


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

Branch: refs/heads/ignite-496
Commit: 412b87d020a67ee96d11265073e3800d9b904414
Parents: 1c5b45a
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Mar 18 15:36:18 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Mar 18 15:36:18 2015 +0700

----------------------------------------------------------------------
 .../cache/store/jdbc/CacheAbstractJdbcStore.java      | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/412b87d0/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
index 79f7315..3d62dca 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
@@ -1195,10 +1195,16 @@ public abstract class CacheAbstractJdbcStore<K, V> implements
CacheStore<K, V>,
         try {
             if (fieldVal != null) {
                 if (field.getJavaType() == UUID.class) {
-                    if (field.getDatabaseType() == Types.BINARY)
-                        fieldVal = U.uuidToBytes((UUID)fieldVal);
-                    else if (F.contains(new int[] { Types.CHAR, Types.VARCHAR }, field.getDatabaseType()))
-                        fieldVal = fieldVal.toString();
+                    switch (field.getDatabaseType()) {
+                        case Types.BINARY:
+                            U.uuidToBytes((UUID)fieldVal);
+                            break;
+
+                        case Types.CHAR:
+                        case Types.VARCHAR:
+                            fieldVal = fieldVal.toString();
+                            break;
+                    }
                 }
 
                 stmt.setObject(i, fieldVal);


Mime
View raw message