Closed scr-oath closed 2 years ago
Because HC5 notifies of failure without invoking the AsyncResponseConsumer consumeResponse method, the entityConsumerRef is not set in the JsonStreamConsumer.
AsyncResponseConsumer
consumeResponse
entityConsumerRef
JsonStreamConsumer
That makes the falling call to get without checking for null throw a NullPointerException.
null
NullPointerException
void failed(Exception cause) { entityConsumerRef.get().failed(cause); }
Fixed by #10
Because HC5 notifies of failure without invoking the
AsyncResponseConsumer
consumeResponse
method, theentityConsumerRef
is not set in theJsonStreamConsumer
.That makes the falling call to get without checking for
null
throw aNullPointerException
.