Skip to content

Commit

Permalink
ARTEMIS-4581 fix NPE crash in PostOfficeImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
p-pavel authored and clebertsuconic committed Jan 22, 2024
1 parent 6f6c572 commit fbfe81e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1969,7 +1969,9 @@ void reapAddresses(boolean initialCheck) {
AddressSettings settings = addressSettingsRepository.getMatch(queue.getAddress().toString());
if (!queue.isInternalQueue() && queue.isAutoDelete() && QueueManagerImpl.consumerCountCheck(queue) && (initialCheck || QueueManagerImpl.delayCheck(queue, settings)) && QueueManagerImpl.messageCountCheck(queue) && (initialCheck || queueWasUsed(queue, settings))) {
// we only reap queues on the initialCheck if they are actually empty
boolean validInitialCheck = initialCheck && queue.getMessageCount() == 0 && !queue.getPagingStore().isPaging();
PagingStore queuePagingStore = queue.getPagingStore();
boolean isPaging = queuePagingStore != null && queuePagingStore.isPaging();
boolean validInitialCheck = initialCheck && queue.getMessageCount() == 0 && !isPaging;
if (validInitialCheck || queue.isSwept()) {
if (logger.isDebugEnabled()) {
if (initialCheck) {
Expand Down

0 comments on commit fbfe81e

Please sign in to comment.