ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/7] ignite git commit: Fixed "IGNITE-6234 Initialize schemaIds to empty set if schemas field is null during the deserialization".
Date Wed, 11 Oct 2017 08:24:51 GMT
Fixed "IGNITE-6234 Initialize schemaIds to empty set if schemas field is null during the deserialization".

Signed-off-by: nikolay_tikhonov <ntikhonov@gridgain.com>


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

Branch: refs/heads/ignite-3478
Commit: 4385f12f8f35ed2afb6ad1f25ed99a642fb326e8
Parents: 17680ae
Author: Krzysztof Chmielewski <krzysiek.chmielewski@gmail.com>
Authored: Tue Oct 10 17:50:59 2017 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Tue Oct 10 17:50:59 2017 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/binary/BinaryMetadata.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4385f12f/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
index ead00b7..4c3448f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
@@ -186,6 +186,9 @@ public class BinaryMetadata implements Externalizable {
      * @return {@code true} if <b>BinaryMetadata</b> instance has schema with
ID specified, {@code false} otherwise.
      */
     public boolean hasSchema(int schemaId) {
+        if (schemaIds == null)
+            return false;
+        
         return schemaIds.contains(schemaId);
     }
 
@@ -304,8 +307,11 @@ public class BinaryMetadata implements Externalizable {
 
         int schemasSize = in.readInt();
 
-        if (schemasSize == -1)
+        if (schemasSize == -1) {
             schemas = null;
+
+            schemaIds = Collections.emptySet();
+        }
         else {
             schemas = new ArrayList<>();
 


Mime
View raw message