Skip to content

basicCancel of invalid cTag on AutorecoveringChannel throws NullPointerException #105

@spatula75

Description

@spatula75

In basicCancel:

    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.

See also https://groups.google.com/forum/#!topic/rabbitmq-users/nIpvcQh4M1M

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions