-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FluxEmpty does not throw NoSuchElementException #1226
Comments
Thanks, indeed this is due to an overeager optimization that detect the If you turn it into a I'll prepare a fix for the 3.2.0 line |
Note: I wonder if we should try to fix it in the 3.1.x line as well, people may have come to rely on this behavior so a fix during a maintenance release is maybe not ideal 🤔 |
@simonbasle i think it should go to 3.1 too. |
Expected behavior
The JavaDoc of Flux#last states:
Steps to reproduce
Actual behavior
The first line does not throw an Exception and returns
null
. The second example throws a NoSuchElementException.Reactor Core version
3.1.6
JVM version (e.g.
java -version
)9.0.4
The text was updated successfully, but these errors were encountered: