-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
Affects: 5.1.11
Using Spring 5.1.11, Spring Boot 2.1.10, Jackson 2.10.1, but it was there in previous versions as well.
There seems to be an issue in Spring Web with #20699, streaming Smile encoded data.
I'm trying to receive a stream of objects created by Spring WebFlux app as Flux<T>
using Smile encoding. JSON stream works OK.
With Smile most of the time I get NullPointerException
:
at com.fasterxml.jackson.databind.util.TokenBuffer.copyCurrentEvent(TokenBuffer.java:1032)
at org.springframework.http.codec.json.Jackson2Tokenizer.processTokenArray(Jackson2Tokenizer.java:170)
at org.springframework.http.codec.json.Jackson2Tokenizer.parseTokenBufferFlux(Jackson2Tokenizer.java:135)
at org.springframework.http.codec.json.Jackson2Tokenizer.tokenize(Jackson2Tokenizer.java:94)
It seems that current token of parser passed to copyCurrentEvent
is null
.
I'm trying now to understand how exactly does it happen but decided to raise the issue anyway.
Unfortunately it's not the easiest one to debug as it goes away if you slow it down, which probably suggests that the problem manifests itself when there's no input available to process as next array element is not received yet.