Fixed "IGNITE-6234 Initialize schemaIds to empty set if schemas field is null during the deserialization".
@@ -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<>();
