NPE thrown by AbstractSingleProcessor
sdeleuze opened this issue · 6 comments
When running JettyWebClientIntegrationTests#shouldSendLargeTextFile
test from this repro project, a NullPointerException
is thrown. The same test is green with Reactor Netty and the new JDK HTTP client (and Reactor is validated against Reactive Streams TCK).
java.lang.NullPointerException
at org.eclipse.jetty.reactive.client.internal.AbstractSingleProcessor.cancel(AbstractSingleProcessor.java:38)
at reactor.core.publisher.MonoNext$NextSubscriber.cancel(MonoNext.java:108)
at reactor.core.publisher.Operators.terminate(Operators.java:642)
at reactor.core.publisher.MonoIgnoreThen$ThenAcceptInner.cancel(MonoIgnoreThen.java:312)
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.cancel(MonoIgnoreThen.java:180)
at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.cancel(FluxPeekFuseable.java:153)
at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.cancel(FluxPeekFuseable.java:153)
at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.cancel(FluxPeekFuseable.java:153)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.cancel(FluxMapFuseable.java:161)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drainLoop(Operators.java:1497)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drain(Operators.java:1466)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.cancel(Operators.java:1278)
at reactor.core.publisher.Operators.terminate(Operators.java:642)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.cancel(MonoFlatMap.java:180)
at reactor.core.publisher.BlockingSingleSubscriber.dispose(BlockingSingleSubscriber.java:63)
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:109)
at reactor.core.publisher.Mono.block(Mono.java:1199)
at org.springframework.web.reactive.function.client.JettyWebClientIntegrationTests.shouldSendLargeTextFile(JettyWebClientIntegrationTests.java:345)
Could you please check if there is something to fix on Jetty side, and maybe plan TCK validation of the RS infrastructure provided with this project when you will have some free cycle?
@sdeleuze the test times out before completing, and it cancels the subscription, which causes the NPE.
I was never able to fail your test locally, as 5 seconds were more than enough to upload the large file, but reducing the timeout to 50 milliseconds reproduced the NPE.
I have fixed a couple of bugs and added a guard for the NPE.
Can you try the latest code (0.9.2-SNAPSHOT) ?
Sure, but where can I find snapshots? I can't find a jetty
directory in https://oss.sonatype.org/content/repositories/snapshots/org/eclipse/.
@sdeleuze good point :)
Give me a while to deploy them, and I will paste the link here.
@sdeleuze you can find the snapshot at this repository:
https://oss.sonatype.org/content/repositories/jetty-snapshots
I confirm that 0.9.2-SNAPSHOT
fixes this issue thanks!