Skip to content

[Bug Fix] Added null check for extracted aspect value#500

Merged
jsdonn merged 1 commit intomasterfrom
rakhi/fix1
Feb 27, 2025
Merged

[Bug Fix] Added null check for extracted aspect value#500
jsdonn merged 1 commit intomasterfrom
rakhi/fix1

Conversation

@rakhiagr
Copy link
Copy Markdown
Contributor

@rakhiagr rakhiagr commented Feb 27, 2025

Summary

Added null check for extracted aspect value.

For Graph queries, we are getting this Null Pointer Exception and analyzing the stack trace we found this could be a potential gap.

Error message:
NullPointerException: Cannot invoke "String.length()" because "content" is null,

Root cause:
java.lang.NullPointerException: Cannot invoke "String.length()" because "content" is null
	at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:1336)
	at com.linkedin.data.codec.JacksonDataCodec.stringToMap(JacksonDataCodec.java:136)
	at com.linkedin.metadata.dao.utils.RecordUtils.toRecordTemplate(RecordUtils.java:93)
	at com.linkedin.metadata.dao.EbeanLocalRelationshipQueryDAO.constructSnapshot(EbeanLocalRelationshipQueryDAO.java:377)
	at com.linkedin.metadata.dao.EbeanLocalRelationshipQueryDAO.lambda$findEntities$0(EbeanLocalRelationshipQueryDAO.java:106)

Testing Done

./gradlew build

Checklist

@rakhiagr rakhiagr changed the title rakhi/fix1 [Bug Fix] Added null check for extracted aspect value Feb 27, 2025
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 66.03%. Comparing base (489394c) to head (cbbab4f).

Files with missing lines Patch % Lines
...n/metadata/dao/EbeanLocalRelationshipQueryDAO.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #500      +/-   ##
============================================
- Coverage     66.05%   66.03%   -0.02%     
  Complexity     1547     1547              
============================================
  Files           137      137              
  Lines          6003     6004       +1     
  Branches        671      672       +1     
============================================
  Hits           3965     3965              
  Misses         1750     1750              
- Partials        288      289       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@jsdonn jsdonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsdonn jsdonn merged commit a9f1320 into master Feb 27, 2025
2 checks passed
jsdonn pushed a commit to jsdonn/datahub-gma that referenced this pull request Feb 28, 2025
)

Co-authored-by: Rakhi Agrawal <rakagrawal@linkedin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants