Skip to content

Commit

Permalink
Merge pull request #3662 from atlanhq/task/minorMM-3720
Browse files Browse the repository at this point in the history
MM-3720 | Add minor improvement
  • Loading branch information
aarshi0301 authored Oct 25, 2024
2 parents dac0b61 + fccce0a commit 0a411fd
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 @@ -90,7 +90,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 @@ -1685,11 +1685,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 0a411fd

Please sign in to comment.