You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public void basicCancel(String consumerTag) throws IOException {
RecordedConsumer c = this.deleteRecordedConsumer(consumerTag);
this.maybeDeleteRecordedAutoDeleteQueue(c.getQueue());
delegate.basicCancel(consumerTag);
}
For a consumerTag that isn't actually known for any reason, this.deleteRecordedConsumer will return null. When c.getQueue() is called in the following line, a NullPointerException is thrown.
It would be more desirable to null-check 'c' and throw an appropriate subclass of IOException indicating that the Consumer does not exist / is not known, or do nothing, whichever makes more sense to be orthogonal with the non-recovering version of Channel.
In basicCancel:
For a consumerTag that isn't actually known for any reason, this.deleteRecordedConsumer will return null. When c.getQueue() is called in the following line, a NullPointerException is thrown.
It would be more desirable to null-check 'c' and throw an appropriate subclass of IOException indicating that the Consumer does not exist / is not known, or do nothing, whichever makes more sense to be orthogonal with the non-recovering version of Channel.
See also https://groups.google.com/forum/#!topic/rabbitmq-users/nIpvcQh4M1M
The text was updated successfully, but these errors were encountered: