mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-03-01 06:49:25 +00:00
ARTEMIS-3778 Just avoiding NPE on Expiry Reaper
Added an extra check on null, just in case it should not happen, but I preferred adding this clause on the safe side
This commit is contained in:
parent
f4bdacbc4c
commit
d0036ee0cc
@ -1873,8 +1873,15 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
|
||||
|
||||
currentQueue = iterator.next();
|
||||
|
||||
// we will expire messages on this queue, once done we move to the next queue
|
||||
currentQueue.expireReferences(this::done);
|
||||
if (currentQueue == null) {
|
||||
logger.debug("iterator.next returned null on ExpiryReaper, giving up iteration");
|
||||
// I don't think this should ever happen, this check should be moot
|
||||
// However I preferred to have this in place just in case
|
||||
iterator = null;
|
||||
} else {
|
||||
// we will expire messages on this queue, once done we move to the next queue
|
||||
currentQueue.expireReferences(this::done);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user