Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace getPersistentEntity with getRequiredPersistentEntity #326

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

roimenashe
Copy link
Member

Replace getPersistentEntity with getRequiredPersistentEntity in places where potentially NullPointerException can be thrown.

…s where potentially NullPointerException can be thrown.
@roimenashe roimenashe added the bug label Dec 10, 2021
@roimenashe roimenashe requested review from Aloren and reugn December 10, 2021 10:41
@roimenashe roimenashe self-assigned this Dec 10, 2021
@roimenashe
Copy link
Member Author

@Aloren
I kept the getPersistentEntity in places where there are null handling (MappingAerospikeReadConverter convertCustomType method line 154)
And different “getPersistentEntity” method that serves as a getter (BaseAerospikePersistenceEntityIndexCreator onApplicationEvent method lines 55 and 63).

Every getPersistentEntity that could result in NPE (even in tests) as the one you mentioned was replaced with getRequiredPersistentEntity which throws the relevant exception.

@roimenashe roimenashe merged commit ea6c8b1 into main Dec 20, 2021
@roimenashe roimenashe deleted the required-persistent-entity branch December 20, 2021 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants