ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [13/22] ignite git commit: IGNITE-1770: Reader refactoring: removing unused raw flags.
Date Mon, 26 Oct 2015 12:57:56 GMT
IGNITE-1770: Reader refactoring: removing unused raw flags.


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

Branch: refs/heads/ignite-1770
Commit: 3b8272e28ba6dee711b746f09937c4ba33aa2ab3
Parents: fc7b4c1
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Oct 26 13:46:58 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Oct 26 13:46:58 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/PortableReaderExImpl.java | 38 ++++++++++----------
 1 file changed, 18 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3b8272e2/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableReaderExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableReaderExImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableReaderExImpl.java
index f7677c5..737aad9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableReaderExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableReaderExImpl.java
@@ -216,7 +216,7 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
 
             int off = in.position();
 
-            Class cls = doReadClass(true, typeId);
+            Class cls = doReadClass(typeId);
 
             // registers class by typeId, at least locally if the cache is not ready yet.
             PortableClassDescriptor desc = ctx.descriptorForClass(cls);
@@ -827,9 +827,9 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
 
             // Revisit: why have we started writing Class for enums in their serialized form?
             if (cls == null)
-                cls = doReadClass(false);
+                cls = doReadClass();
             else
-                doReadClass(false);
+                doReadClass();
 
             Object[] vals = GridEnumCache.get(cls);
 
@@ -851,9 +851,9 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
 
             if (flag == Flag.NORMAL) {
                 if (cls == null)
-                    cls = doReadClass(false);
+                    cls = doReadClass();
                 else
-                    doReadClass(false);
+                    doReadClass();
 
                 return doReadEnumArray(false, cls);
             }
@@ -874,7 +874,7 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
             if (checkFlag(CLASS, false) == Flag.NULL)
                 return null;
 
-            return doReadClass(false);
+            return doReadClass();
         }
 
         return null;
@@ -1340,7 +1340,7 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
         if (checkFlag(ENUM, true) == Flag.NULL)
             return null;
 
-        Class cls = doReadClass(true);
+        Class cls = doReadClass();
 
         return (T)doReadEnum(true, cls);
     }
@@ -1356,7 +1356,7 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
         if (checkFlag(ENUM_ARR, true) == Flag.NULL)
             return null;
 
-        Class cls = doReadClass(true);
+        Class cls = doReadClass();
 
         return (T[])doReadEnumArray(true, cls);
     }
@@ -1556,10 +1556,10 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
                 return doReadPortableObject(raw);
 
             case ENUM:
-                return doReadEnum(raw, doReadClass(raw));
+                return doReadEnum(raw, doReadClass());
 
             case ENUM_ARR:
-                return doReadEnumArray(raw, doReadClass(raw));
+                return doReadEnumArray(raw, doReadClass());
 
             case CLASS:
                 return in.readInt();
@@ -1891,17 +1891,17 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
                 break;
 
             case ENUM:
-                obj = doReadEnum(true, doReadClass(true));
+                obj = doReadEnum(true, doReadClass());
 
                 break;
 
             case ENUM_ARR:
-                obj = doReadEnumArray(true, doReadClass(true));
+                obj = doReadEnumArray(true, doReadClass());
 
                 break;
 
             case CLASS:
-                obj = doReadClass(true);
+                obj = doReadClass();
 
                 break;
 
@@ -2210,7 +2210,7 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
     private Object[] doReadObjectArray(boolean raw, boolean deep) throws PortableException
{
         int hPos = in.position() - 1;
 
-        Class compType = doReadClass(raw);
+        Class compType = doReadClass();
 
         int len = in.readInt();
 
@@ -2465,26 +2465,24 @@ public class PortableReaderExImpl implements PortableReader, PortableRawReaderEx
             if (flag == NULL)
                 arr[i] = null;
             else
-                arr[i] = doReadEnum(raw, doReadClass(raw));
+                arr[i] = doReadEnum(raw, doReadClass());
         }
 
         return arr;
     }
 
     /**
-     * @param raw Raw flag.
      * @return Value.
      */
-    private Class doReadClass(boolean raw) throws PortableException {
-        return doReadClass(raw, in.readInt());
+    private Class doReadClass() throws PortableException {
+        return doReadClass(in.readInt());
     }
 
     /**
-     * @param raw Raw flag.
      * @param typeId Type id.
      * @return Value.
      */
-    private Class doReadClass(boolean raw, int typeId) throws PortableException {
+    private Class doReadClass(int typeId) throws PortableException {
         Class cls;
 
         if (typeId == OBJECT_TYPE_ID)


Mime
View raw message