Commit b86e8591 by ashutoshm Committed by Madhan Neethiraj

ATLAS-1672: fix for issues flagged by Coverity scan

parent 94158e16
......@@ -231,8 +231,14 @@ public class AtlasEntityChangeNotifier {
if (StringUtils.isEmpty(entityId) || CollectionUtils.isEmpty(classifications)) {
return;
}
AtlasVertex atlasVertex = AtlasGraphUtilsV1.findByGuid(entityId);
if (atlasVertex == null) {
LOG.warn("updateFullTextMapping(): no entity exists with guid {}", entityId);
return;
}
try {
String classificationFullText = fullTextMapperV2.getIndexTextForClassifications(entityId, classifications);
String existingFullText = (String) GraphHelper.getProperty(atlasVertex, Constants.ENTITY_TEXT_PROPERTY_KEY);
......
......@@ -196,7 +196,8 @@ public class ZipSource implements EntityImportStream {
private AtlasEntity getEntity(String guid) throws AtlasBaseException {
if(guidEntityJsonMap.containsKey(guid)) {
return getEntityWithExtInfo(guid).getEntity();
AtlasEntityWithExtInfo extInfo = getEntityWithExtInfo(guid);
return (extInfo != null) ? extInfo.getEntity() : null;
}
return null;
......
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