Possible NullPointerException in ReplyConsumer class
Brought to you by:
niallg
I have seen no usage of this class (in 4.1.8), anyway:
In org.simpleframework.http.core.ReplyConsumer
* public Builder builder;
Hides the one declared in the superclass.
* The constructor
public ReplyConsumer(Allocator allocator, Builder builder) {
super(allocator, builder, null);
...
}
pass null for Channel argument to superclass constructor:
public BuilderConsumer(Allocator allocator, Builder builder, Channel channel) {
this.header = new RequestConsumer();
this.expect = new Expectation(channel);
...
}
Where Expectation constructor call a getter on channel:
public Expectation(Channel channel) {
this.sender = channel.getSender();
}
Which going to throw a NullPointerException.