ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [49/50] incubator-ignite git commit: IGNITE-141 - Marshallers refactoring
Date Mon, 02 Mar 2015 18:45:55 GMT
IGNITE-141 - Marshallers refactoring


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

Branch: refs/heads/ignite-141
Commit: dbca43386b7d5ab4f981d09d9f76567f25fd06ca
Parents: 095f31d
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Mon Mar 2 10:42:42 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Mon Mar 2 10:42:42 2015 -0800

----------------------------------------------------------------------
 .../marshaller/optimized/OptimizedMarshallerUtils.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dbca4338/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
index 598b5fc..7820e0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
@@ -129,22 +129,22 @@ class OptimizedMarshallerUtils {
     static OptimizedClassDescriptor classDescriptor(int id, ClassLoader ldr, MarshallerContext
ctx,
         OptimizedMarshallerIdMapper mapper)
         throws IOException, ClassNotFoundException {
-        Class cls = CLS_BY_ID.get(id).get1();
+        IgniteBiTuple<Class, Boolean> t = CLS_BY_ID.get(id);
 
-        if (cls == null) {
+        if (t == null) {
             String clsName = ctx.className(id);
 
             assert clsName != null : id;
 
-            cls = U.forName(clsName, ldr);
+            Class cls = U.forName(clsName, ldr);
 
-            IgniteBiTuple<Class, Boolean> old = CLS_BY_ID.putIfAbsent(id, F.t(cls,
false));
+            IgniteBiTuple<Class, Boolean> old = CLS_BY_ID.putIfAbsent(id, t = F.t(cls,
false));
 
             if (old != null)
-                cls = old.get1();
+                t = old;
         }
 
-        return classDescriptor(cls, ctx, mapper);
+        return classDescriptor(t.get1(), ctx, mapper);
     }
 
     /**


Mime
View raw message