From 1a91decf9f6dd7305dd91ae6769df78cc4758c82 Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Wed, 26 Oct 2016 13:27:24 -0400 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-6483 Fix conversion from long to int and back to long again. --- .../org/apache/activemq/store/kahadb/KahaDBStore.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java index 66d616b78c..b4f6c6ffec 100644 --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java @@ -936,17 +936,17 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter, } else { indexLock.writeLock().lock(); try { - return pageFile.tx().execute(new Transaction.CallableClosure() { + return pageFile.tx().execute(new Transaction.CallableClosure() { @Override - public Integer execute(Transaction tx) throws IOException { + public Long execute(Transaction tx) throws IOException { StoredDestination sd = getStoredDestination(dest, tx); LastAck cursorPos = getLastAck(tx, sd, subscriptionKey); if (cursorPos == null) { // The subscription might not exist. - return 0; + return 0l; } - return (int) getStoredMessageSize(tx, sd, subscriptionKey); + return getStoredMessageSize(tx, sd, subscriptionKey); } }); } finally { @@ -955,7 +955,6 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter, } } - protected void recoverMessageStoreSubMetrics() throws IOException { if (isEnableSubscriptionStatistics()) {