Skip to content

Commit

Permalink
Merge pull request #3663 from atlanhq/dev/task/minorMM-3720
Browse files Browse the repository at this point in the history
MM-3720 | Add minor check
  • Loading branch information
aarshi0301 authored Oct 25, 2024
2 parents d630958 + b4f86d4 commit e60126c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public AtlasType getType(String typeName) throws AtlasBaseException {

AtlasType ret = registryData.allTypes.getTypeByName(typeName);

if (ret == null) {
if (ret == null ) {
if (typeName.startsWith(ATLAS_TYPE_ARRAY_PREFIX) && typeName.endsWith(ATLAS_TYPE_ARRAY_SUFFIX)) {
int startIdx = ATLAS_TYPE_ARRAY_PREFIX.length();
int endIdx = typeName.length() - ATLAS_TYPE_ARRAY_SUFFIX.length();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1690,11 +1690,15 @@ private AtlasStruct mapVertexToStruct(AtlasVertex entityVertex, String edgeLabel
if (GraphHelper.elementExists(edge)) {
final AtlasVertex referenceVertex = edge.getInVertex();

if (referenceVertex == null) {
LOG.error("reference vertex not found on edge {} from vertex {} ", edge.getId(), getGuid(entityVertex));
return ret;
}

String typeName = getTypeName(referenceVertex);

if (StringUtils.isEmpty(typeName)) {
LOG.error("typeName not found for in-vertex {} on edge {} from vertex {} ",
getGuid(referenceVertex), edge.getId(), getGuid(entityVertex));
LOG.error("typeName not found on edge {} from vertex {} ", edge.getId(), getGuid(entityVertex));
return ret;
}

Expand Down

0 comments on commit e60126c

Please sign in to comment.