Menu

#21 Possible NullPointerException in ReplyConsumer class

open
nobody
Bug (26)
5
2009-03-18
2009-03-18
Anonymous
No

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.

Discussion


Log in to post a comment.