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

avoid nullpointers in list-typed fields #4

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

avoid nullpointers in list-typed fields #4

wants to merge 1 commit into from

Conversation

borisskert
Copy link
Contributor

While using the smartanalytics server some NullpointerExceptions occured while iterating through lists provided of some fields. These changes could lower the possibility of occuring Nullpointers.

If you dont like this changes we should speak about the logic in the smartanalytics server.

@DG0lden
Copy link
Contributor

DG0lden commented Jun 13, 2018

This makes Sense, only if you make setters with Null-Check. Is it easier to use Lombok NonNull annotation on the field?

@borisskert
Copy link
Contributor Author

borisskert commented Jun 13, 2018

I'm not sure whether some API consumers are setting null values implicitly (like via object-mappers) or explicitly. They are retrieving exceptions in this case and logic will break.
My change was only about to set default values if no setter is called. We got some nullpointer exceptions in smartanalytics-server thats the reason.

I know there have to be changes in smartanalytics-server and mutlibanking to make this more stable. But this here is a first little step in my opinion.

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