ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [06/11] ignite git commit: Fixed GridCacheAtomicEntryProcessorDeploymentSelfTest.
Date Fri, 31 Mar 2017 17:06:00 GMT
Fixed GridCacheAtomicEntryProcessorDeploymentSelfTest.


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

Branch: refs/heads/ignite-3477-master
Commit: 5cf3f05d476407e7a8bcdacb516f8d826c968300
Parents: 22fc1d7
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Fri Mar 31 15:35:44 2017 +0300
Committer: Ilya Lantukh <ilantukh@gridgain.com>
Committed: Fri Mar 31 15:35:44 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/CacheObjectImpl.java  | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5cf3f05d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
index be04d6b..3183593 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java
@@ -64,8 +64,16 @@ public class CacheObjectImpl extends CacheObjectAdapter {
                     valBytes = ctx.processor().marshal(ctx, val);
                 }
 
-                return (T)ctx.processor().unmarshal(ctx, valBytes,
-                    val == null ? ctx.kernalContext().config().getClassLoader() : val.getClass().getClassLoader());
+                ClassLoader clsLdr;
+
+                if (val != null)
+                    clsLdr = val.getClass().getClassLoader();
+                else if (ctx.kernalContext().config().isPeerClassLoadingEnabled())
+                    clsLdr = ctx.kernalContext().cache().context().deploy().globalLoader();
+                else
+                    clsLdr = null;
+
+                return (T)ctx.processor().unmarshal(ctx, valBytes, clsLdr);
             }
 
             if (val != null)
@@ -73,7 +81,9 @@ public class CacheObjectImpl extends CacheObjectAdapter {
 
             assert valBytes != null;
 
-            Object val = ctx.processor().unmarshal(ctx, valBytes, ctx.kernalContext().config().getClassLoader());
+            Object val = ctx.processor().unmarshal(ctx, valBytes,
+                ctx.kernalContext().config().isPeerClassLoadingEnabled() ?
+                    ctx.kernalContext().cache().context().deploy().globalLoader() : null);
 
             if (ctx.storeValue())
                 this.val = val;


Mime
View raw message