From b2ffe9ff5743cf65bfd5b60a5e25951cd36fa547 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Wed, 10 Apr 2024 22:42:29 -0500 Subject: [PATCH] ARTEMIS-1634 unintentional integer overflow --- .../activemq/artemis/core/management/impl/QueueControlImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java index 4dae496fbd..c45627dc2c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java @@ -1696,7 +1696,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { try { long index = 0; long start = (long) (page - 1) * pageSize; - long end = Math.min(page * pageSize, queue.getMessageCount()); + long end = Math.min((long) page * pageSize, queue.getMessageCount()); ArrayList c = new ArrayList<>(); Filter thefilter = FilterImpl.createFilter(filter);