Commit 6fb7b82a by Suma Shivaprasad

ATLAS-1305 Fix potential NPEs in instance conversion code(sumasai)

parent c413975a
...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: ALL CHANGES:
ATLAS-1305 Fix potential NPEs in instance conversion code (sumasai)
ATLAS-1349 Reduce excessive exception logging (apoorvnaik via svimal2106) ATLAS-1349 Reduce excessive exception logging (apoorvnaik via svimal2106)
ATLAS-1343 CTAS query is not captured by Atlas with Hive2 (svimal2106) ATLAS-1343 CTAS query is not captured by Atlas with Hive2 (svimal2106)
ATLAS-1337 fixed FalconHookIT (ayubpathan via mneethiraj) ATLAS-1337 fixed FalconHookIT (ayubpathan via mneethiraj)
......
...@@ -393,7 +393,7 @@ public class EntityREST { ...@@ -393,7 +393,7 @@ public class EntityREST {
*/ */
private void validateUniqueAttribute(AtlasEntityType entityType, String attributeName) throws AtlasBaseException { private void validateUniqueAttribute(AtlasEntityType entityType, String attributeName) throws AtlasBaseException {
AtlasStructDef.AtlasAttributeDef attribute = entityType.getAttributeDef(attributeName); AtlasStructDef.AtlasAttributeDef attribute = entityType.getAttributeDef(attributeName);
if (!attribute.getIsUnique()) { if (attribute != null && !attribute.getIsUnique()) {
throw new AtlasBaseException(AtlasErrorCode.ATTRIBUTE_UNIQUE_INVALID, entityType.getTypeName(), attributeName); throw new AtlasBaseException(AtlasErrorCode.ATTRIBUTE_UNIQUE_INVALID, entityType.getTypeName(), attributeName);
} }
} }
......
...@@ -337,7 +337,7 @@ public class TypedefsJerseyResourceIT extends BaseResourceIT { ...@@ -337,7 +337,7 @@ public class TypedefsJerseyResourceIT extends BaseResourceIT {
} else if (typeDef.getCategory() == TypeCategory.ENTITY) { } else if (typeDef.getCategory() == TypeCategory.ENTITY) {
byGuid = clientV2.getEntityByGuid(typeDef.getGuid()); byGuid = clientV2.getEntityByGuid(typeDef.getGuid());
} else if (typeDef.getCategory() == TypeCategory.CLASSIFICATION) { } else if (typeDef.getCategory() == TypeCategory.CLASSIFICATION) {
byGuid = clientV2.getClassificationByGuid(typeDef.getName()); byGuid = clientV2.getClassificationByGuid(typeDef.getGuid());
} else if (typeDef.getCategory() == TypeCategory.STRUCT) { } else if (typeDef.getCategory() == TypeCategory.STRUCT) {
byGuid = clientV2.getStructByGuid(typeDef.getGuid()); byGuid = clientV2.getStructByGuid(typeDef.getGuid());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment