-
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
log() after window leads to UnsupportedOperationException #1270
Comments
That's a case of Log4J2 (being a bit too smart and) attempting "deep toString" on a The What you can do:
Flux.just(1, 2, 3, 4, 5)
.window(2)
.flatMap(w -> w.log())
.subscribe(); What we could do: |
Thanks for explaining this strange behavior. Maybe you could make the exception message a bit more self explanatory, since "UnsupportedOperationException: Operators should not use this method!" is not that helpful in this case. |
It is a very generic message, but it comes from a very general-purpose class (the |
We'll probably reword the message a bit ( [1] https://shipilev.net/blog/2014/exceptional-performance/ for reference, but in the present case I think the stack trace has value (knowing who called the unsupported method, and which method it was) |
The following example with
log()
afterwindow(3)
leads to ajava.lang.UnsupportedOperationException
:It works if I move the
log()
method call beforewindow(3)
:It looks a bit like a Log4j problem, but the Log4j config is actually very basic:
Expected behavior
Usual logging.
Actual behavior
The code throws an
UnsupportedOperationException
with this stacktrace:Steps to reproduce
Run this method:
Reactor Core version
3.1.8.RELEASE
JVM version
1.8.0_172
The text was updated successfully, but these errors were encountered: