-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
The mapper function returned a null value. #5775
Comments
2.x
Question
Nulls are not allowed in 2.x. Check your mapper function why it returns null. |
Thank you! I'm find the error. |
Maybe add better logging to this? I have multiple streams running in background and can't pinpoint where is this mapper function returning null value |
You could use the function tagging support in the extensions project, or simply define your lambdas in a way that throw on null return: source.map(v -> {
// some computation
return Objects.requireNonNull(result);
}); |
I'm getting that a lot in my Sentry log, so is there any way to find out what is causing that, please? |
Thanks for this library!
I upgraded RxJava to 2.x in my Android app and now I get an error:
NullPointerException: the mapper function returned a null value
. Exception is thrown byObjectHelper
.It appear inside this part of code (FlowableMap.java):
return t != null ? ObjectHelper.<U>requireNonNull(mapper.apply(t), "The mapper function returned a null value.") : null;
Seems that
mapper.apply(t)
return null...I call onNext using enum object
Also SystemEvent class :
Here the stack trace:
The text was updated successfully, but these errors were encountered: