ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-950-new - Fixing tests.
Date Mon, 02 Nov 2015 06:48:59 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-950-new ba5fa78e4 -> 6037685c1


IGNITE-950-new - Fixing tests.


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

Branch: refs/heads/ignite-950-new
Commit: 6037685c1a0296ffe7af61096015fe3ecb8694bc
Parents: ba5fa78
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Mon Nov 2 09:48:45 2015 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Mon Nov 2 09:48:45 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheConcurrentMap.java | 10 +++++++---
 .../internal/processors/query/GridQueryProcessor.java     |  4 ++--
 .../java/org/apache/ignite/internal/util/IgniteUtils.java |  4 ++--
 3 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6037685c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
index 1be7c07..2e37eda 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
@@ -1878,7 +1878,7 @@ public class GridCacheConcurrentMap {
          * @return Key iterator.
          */
         Iterator<K> keyIterator() {
-            return new KeyIterator<>(map, filter);
+            return new KeyIterator<>(map, opCtxPerCall.isKeepPortable(), filter);
         }
 
         /**
@@ -2156,6 +2156,9 @@ public class GridCacheConcurrentMap {
         /** Hash table iterator. */
         private Iterator0<K, V> it;
 
+        /** Keep binary flag. */
+        private boolean keepBinary;
+
         /**
          * Empty constructor required for {@link Externalizable}.
          */
@@ -2167,8 +2170,9 @@ public class GridCacheConcurrentMap {
          * @param map Cache map.
          * @param filter Filter.
          */
-        private KeyIterator(GridCacheConcurrentMap map, CacheEntryPredicate[] filter) {
+        private KeyIterator(GridCacheConcurrentMap map, boolean keepBinary, CacheEntryPredicate[]
filter) {
             it = new Iterator0<>(map, false, filter, -1, -1);
+            this.keepBinary = keepBinary;
         }
 
         /** {@inheritDoc} */
@@ -2178,7 +2182,7 @@ public class GridCacheConcurrentMap {
 
         /** {@inheritDoc} */
         @Override public K next() {
-            return it.next().key().value(it.ctx.cacheObjectContext(), true);
+            return (K)it.ctx.cacheObjectContext().unwrapPortableIfNeeded(it.next().key(),
keepBinary, true);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/6037685c/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 2f18ca3..a9d6243 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -200,7 +200,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
                     // Key and value classes still can be available if they are primitive
or JDK part.
                     // We need that to set correct types for _key and _val columns.
-                    Class<?> keyCls = U.classForName(qryEntity.getKeyType(), null);
+                    Class<?> keyCls = U.classForName(qryEntity.getKeyType(), Object.class);
                     Class<?> valCls = U.classForName(qryEntity.getValueType(), null);
 
                     String simpleValType = valCls == null ? qryEntity.getValueType() : typeName(valCls);
@@ -262,7 +262,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
                     // Key and value classes still can be available if they are primitive
or JDK part.
                     // We need that to set correct types for _key and _val columns.
-                    Class<?> keyCls = U.classForName(meta.getKeyType(), null);
+                    Class<?> keyCls = U.classForName(meta.getKeyType(), Object.class);
                     Class<?> valCls = U.classForName(meta.getValueType(), null);
 
                     desc.name(meta.getSimpleValueType());

http://git-wip-us.apache.org/repos/asf/ignite/blob/6037685c/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 762cc2a..259d8c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -1336,9 +1336,9 @@ public abstract class IgniteUtils {
      */
     @Nullable public static Class<?> classForName(String cls, @Nullable Class<?>
dflt) {
         try {
-            return Class.forName(cls);
+            return cls == null ? dflt : Class.forName(cls);
         }
-        catch (ClassNotFoundException e) {
+        catch (ClassNotFoundException ignore) {
             return dflt;
         }
     }


Mime
View raw message