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,10 +1873,17 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
|
||||||
|
|
||||||
currentQueue = iterator.next();
|
currentQueue = iterator.next();
|
||||||
|
|
||||||
|
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
|
// we will expire messages on this queue, once done we move to the next queue
|
||||||
currentQueue.expireReferences(this::done);
|
currentQueue.expireReferences(this::done);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private final class AddressQueueReaper extends ActiveMQScheduledComponent {
|
private final class AddressQueueReaper extends ActiveMQScheduledComponent {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue