Merge remote-tracking branch 'remotes/origin/gg-9887' into sprint-2

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

Branch: refs/heads/ignite-424
Commit: 86987b033bf066fa635d2ae2c427060aba9b84c0
Parents: eb8756c 45ee8e8
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Tue Mar 17 16:54:45 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Tue Mar 17 16:54:45 2015 +0300

----------------------------------------------------------------------
 .../IgniteCacheObjectProcessorImpl.java         | 80 ++++++++++++--------
 1 file changed, 50 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/86987b03/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 5765569,385eb5b..856801a
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@@ -221,38 -221,9 +221,9 @@@ public class IgniteCacheObjectProcessor
          }
  
          if (!userObj)
 -            new CacheObjectImpl(obj, null);
 +            return new CacheObjectImpl(obj, null);
  
-         return new CacheObjectImpl(obj, null) {
-             @Nullable @Override public <T> T value(CacheObjectContext ctx, 
boolean cpy) {
-                 return super.value(ctx, false); // Do not need copy since 
user value is not in cache.
-             }
- 
-             @Override public CacheObject prepareForCache(CacheObjectContext 
ctx) {
-                 if (!ctx.processor().immutable(val)) {
-                     try {
-                         if (valBytes == null)
-                             valBytes = ctx.processor().marshal(ctx, val);
- 
-                         if (ctx.unmarshalValues()) {
-                             ClassLoader ldr = ctx.p2pEnabled() ?
-                                 
IgniteUtils.detectClass(this.val).getClassLoader() : 
val.getClass().getClassLoader();
- 
-                             Object val = ctx.processor().unmarshal(ctx, 
valBytes, ldr);
- 
-                             return new CacheObjectImpl(val, valBytes);
-                         }
- 
-                         return new CacheObjectImpl(null, valBytes);
-                     }
-                     catch (IgniteCheckedException e) {
-                         throw new IgniteException("Failed to marshal object: 
" + val, e);
-                     }
-                 }
-                 else
-                     return new CacheObjectImpl(val, valBytes);
-             }
-         };
+         return new IgniteCacheObjectImpl(obj, null);
      }
  
      /** {@inheritDoc} */

Reply via email to