Fixed GridCacheAtomicEntryProcessorDeploymentSelfTest.
@@ -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;
