Skip to content

Commit 13d5b7a

Browse files
committed
QueueingConsumer.handle: Changed assert -> IllegalStateException for POISON sanity check.
1 parent fd9def6 commit 13d5b7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/com/rabbitmq/client/QueueingConsumer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ private Delivery handle(Delivery delivery) {
137137
delivery == null && _shutdown != null) {
138138
if (delivery == POISON) {
139139
_queue.add(POISON);
140-
assert _shutdown != null;
140+
if (_shutdown == null) {
141+
throw new IllegalStateException(
142+
"POISON in queue, but null _shutdown. " +
143+
"This should never happen, please report as a BUG");
144+
}
141145
}
142146
throw Utility.fixStackTrace(_shutdown);
143147
}

0 commit comments

Comments
 (0)