This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new b2ffe9ff57 ARTEMIS-1634 unintentional integer overflow
b2ffe9ff57 is described below
commit b2ffe9ff5743cf65bfd5b60a5e25951cd36fa547
Author: Justin Bertram <[email protected]>
AuthorDate: Wed Apr 10 22:42:29 2024 -0500
ARTEMIS-1634 unintentional integer overflow
---
.../apache/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<CompositeData> c = new ArrayList<>();
Filter thefilter = FilterImpl.createFilter(filter);