Repository: atlas Updated Branches: refs/heads/branch-0.8 7b6e06124 -> a1a552537
ATLAS-2883: updated StructInstance.setNull() to handle all datatypes Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/a1a55253 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/a1a55253 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/a1a55253 Branch: refs/heads/branch-0.8 Commit: a1a552537763de89e95f3edde90136b55f947fc4 Parents: 7b6e061 Author: Madhan Neethiraj <mad...@apache.org> Authored: Thu Sep 20 14:33:35 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu Sep 20 16:17:07 2018 -0700 ---------------------------------------------------------------------- .../atlas/typesystem/persistence/StructInstance.java | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/a1a55253/typesystem/src/main/java/org/apache/atlas/typesystem/persistence/StructInstance.java ---------------------------------------------------------------------- diff --git a/typesystem/src/main/java/org/apache/atlas/typesystem/persistence/StructInstance.java b/typesystem/src/main/java/org/apache/atlas/typesystem/persistence/StructInstance.java index 3136ae2..ef1486d 100755 --- a/typesystem/src/main/java/org/apache/atlas/typesystem/persistence/StructInstance.java +++ b/typesystem/src/main/java/org/apache/atlas/typesystem/persistence/StructInstance.java @@ -258,6 +258,16 @@ public class StructInstance implements ITypedStruct { ints[pos] = 0; } else if (i.dataType() == DataTypes.BOOLEAN_TYPE) { bools[pos] = false; + } else if (i.dataType() == DataTypes.BYTE_TYPE) { + bytes[pos] = 0; + } else if (i.dataType() == DataTypes.SHORT_TYPE) { + shorts[pos] = 0; + } else if (i.dataType() == DataTypes.LONG_TYPE) { + longs[pos] = 0; + } else if (i.dataType() == DataTypes.FLOAT_TYPE) { + floats[pos] = 0; + } else if (i.dataType() == DataTypes.DOUBLE_TYPE) { + doubles[pos] = 0; } else if (i.dataType() == DataTypes.STRING_TYPE) { strings[pos] = null; } else if (i.dataType().getTypeCategory() == DataTypes.TypeCategory.ENUM) {